【发布时间】:2019-08-02 12:10:28
【问题描述】:
我有以下 python 指令:
subprocess.run('gswin64c -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -sOutputFile=C:/Users/ingNC/Desktop/results/Sub-frame4.png C:/Users/ingNC/Desktop/test/Sub-frame4.ps', shell=True, check=True, text=True)
我有 .ps 文件“Sub-frame4.ps”,我想将此文件转换为名为“Sub-frame4.png”的 .png 文件,并将后者保存在“results”文件夹中。在运行指令之前,我需要创建文件“Sub-frame4.png”吗?或者这个文件会在命令执行过程中创建?
【问题讨论】:
标签: python-3.x subprocess ghostscript