我很新于Python,正在使用PPTX Python进行项目开发。
一切都很好,但我不知道如何选择保存文件的目录。
以下是我的代码:
from pptx import Presentation
prs = Presentation()
title_slide_layout = prs.slide_layouts[0]
slide = prs.slides.add_slide(title_slide_layout)
title = slide.shapes.title
subtitle = slide.placeholders[1]
title.text = "Hello, World!"
subtitle.text = "python-pptx was here!"
prs.save('test.pptx')
它将保存在我的桌面上。我如何选择目录?
谢谢! PS:我正在使用Python 3.7。