

Plus, for a particular job that I ran, there is additional messaging that ends up in out: Background RRGGBBAA: ffffff00Īrea 0:0:339:339 exported to 100 x 100 pixels (72.4584 dpi) On my Mac OS system, the crufty status messages (described by the original poster) end up in err. Raise Exception( 'Inkscape error: ' + (err or '?') ) # Maybe do something with stderr output that is in # Maybe do something with stdout output that is in Out, err = p.communicate() # Waits for process to terminate # Below, and are strings or, derived from stdout and stderr. P = subprocess.Popen( cmd_list, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) Divert output that normally goes to stdout or stderr. import subprocess # May want to use subprocess32 insteadĬmd_list = [ '/full/path/to/inkscape', '-z', Maybe if I turn off or reset a bash DISPLAY env var? I'm not at all familiar with X.Īnother way to suppress the output, while preserving the ability to respond to true errors, is to call Inkscape from Python. Even if the best answer is just "suppress error output"! Performance on my dev machine is still sub-second (at least for trivial SVG files), but I'd like to clean this up if I can. However, other than using the -z/-without-gui flag, I am not sure what to try. This suggests to me that inkscape is loading more libraries than it needs to, and that it could be faster if it didn't try to connect to an X server. Xlib: extension "RANDR" missing on display "/tmp/launch-WvcqRh/org.x:0". (process:44699): Gtk-WARNING **: Locale not supported by C library. It works, but despite the -z flag ("Do not use X server") I get this in my console output (on OS X): Setting Language.

I use something like this (line breaks added here just for clarity): /full/path/to/inkscape -z \

I am running inkscape from a Gearman PHP process on *nix-like systems (OS X 10.6.8, Linux of varying flavours) to convert SVG images to either PNG or PDF.
