我需要在Python中构建完整路径。我尝试了以下代码:
filename= "myfile.odt"
subprocess.call(['C:\Program Files (x86)\LibreOffice 5\program\soffice.exe',
'--headless',
'--convert-to',
'pdf', '--outdir',
r'C:\Users\A\Desktop\Repo\',
r'C:\Users\A\Desktop\Repo\'+filename])
但是我遇到了这个错误
语法错误:扫描字符串文字时出现行尾错误。