wordtopdf函数路劲分割错误
发表在Python图书答疑
2020-04-16
《Python项目开发案例集锦》第8章 Word助手 129页-129页
是否精华
是
否
版块置顶:
是
否
for fullfilename in filelist:
temp = fullfilename.split('\\')
path = temp[0]
softfilename = os.path.splitext(temp[1])
filename = temp[1]
os.chdir(path)
doc = os.path.abspath(filename)temp=fullfiename.split('\\')分隔出来的结果为:
['C:', 'Users', 'eric_', 'Downloads', '20171222184343_ix8n2m1uct.docx']
根据后面使用的情况,应当使用
temp = os.path.split(fullfilename)
于2020-04-16 13:15:50编辑

购物车
发表新帖
立即签到







