别人传我Python文件,我电脑只能word打开,但是Python软件是能单独点开并运行的。不知道要怎么办?
文件右键选择打开方式,点击Python的话,电脑无反应
你给我 我替你运行, 你的电脑配置是不是太低了
不知道你这个问题是否已经解决, 如果还没有解决的话:
from docxtpl import DocxTemplate
tpl=DocxTemplate('test_files/header_footer_entities_tpl.docx')
context = {
'title' : 'Header and footer test',
}
tpl.render(context)
tpl.save('header_footer_entities.docx')
模板文件header_footer_entities_tpl.docx
生成文件header_footer_entities.docx
安装一个python集成环境,比如anaconda、pycharm或者xcode