在Python中调用Inkscape [英] Calling Inkscape in Python

查看:696
本文介绍了在Python中调用Inkscape的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
在Python中调用外部命令

Possible Duplicate:
Calling an external command in Python

我正在尝试将SVG文件转换为Python中的PDF.我想为此使用Inkscape.如何在Python中调用Inkscape?

I am trying to convert SVG files to PDFs in Python. I want to use Inkscape for this. How can I call Inkscape in Python ?

推荐答案

如果您根本不需要与流程进行通信,那应该就可以了:

If you don't need to communicate with the process at all, this should do just fine:

import subprocess
p=subprocess.call(['program','arg1','arg2','arg3', ...])

这篇关于在Python中调用Inkscape的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆