我有一个GhostScript命令(windows命令提示符),我想从Python执行它。 我可以成功运行:
os.system(gswin64c.exe -sDEVICE=tiff24nc -r300 -o fullfilename.tiff fullfilename)
但我有个错误:
os.system(gswin64c.exe -sDEVICE=tiff24nc -r300 -o fullfilename.tiff -g235x49 -c "<</Install {-478 -743 translate}>> setpagedevice" -f fullfilename)
而这个命令在命令提示符下运行良好。 我把范围缩小到这个问题:
-c "<</Install {-478 -743 translate}>> setpagedevice"
似乎有些字符是由python而不是GhostScript解释的。
如果我打印命令,它返回1。所以有一个错误。
不知道如何严格地将整个命令传递给windows命令提示符。
谢谢
哈波
我想我已经审阅了所有可能的帖子,但答案是:Problem using os.system() with sed command。
用法:导入子流程。
然后呼叫您的命令:子流程调用(命令)
相关问题 更多 >
编程相关推荐