from python_pptx import Presentation
# 创建一个新的PPTX文件
def create_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 = "免费企业文件管理系统"
subtitle.text = "使用Python和python-pptx"
# 保存PPTX文件
prs.save('免费企业文件管理.pptx')
if __name__ == "__main__":
create_presentation()
]]>
import os
import shutil
# 检查文件是否存在
def check_file_exists(file_path):
return os.path.exists(file_path)
# 复制文件
def copy_file(src, dest):
shutil.copy(src, dest)
# 删除文件
def delete_file(file_path):
os.remove(file_path)
]]>
本站知识库部分内容及素材来源于互联网,如有侵权,联系必删!