summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dcf3f73)
raw | patch | inline | side by side (parent: dcf3f73)
author | JazzyNico <nicoduf@yahoo.fr> | |
Sun, 29 Nov 2009 12:42:45 +0000 (13:42 +0100) | ||
committer | JazzyNico <nicoduf@yahoo.fr> | |
Sun, 29 Nov 2009 12:42:45 +0000 (13:42 +0100) |
share/extensions/gimp_xcf.py | patch | blob | history |
index 22e45006b3b0ff01d3c02f7d9e988747c667375d..92da6cf40ff04c7b18deace6fe7d4f7545a37ec5 100755 (executable)
import inkex
import sys, os, tempfile
+try:
+ from subprocess import Popen, PIPE
+ bsubprocess = True
+except:
+ bsubprocess = False
+
class MyEffect(inkex.Effect):
def __init__(self):
inkex.Effect.__init__(self)
name = "%s.png" % id
filename = os.path.join(tmp_dir, name)
command = "inkscape -i %s -j %s -e %s %s " % (id, area, filename, svg_file)
- _,f,err = os.popen3(command,'r')
+ if bsubprocess:
+ p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE)
+ return_code = p.wait()
+ f = p.stdout
+ err = p.stderr
+ else:
+ _,f,err = os.popen3(command,'r')
f.read()
f.close()
err.close()