summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7642df8)
raw | patch | inline | side by side (parent: 7642df8)
author | JazzyNico <nicoduf@yahoo.fr> | |
Sun, 28 Mar 2010 06:45:18 +0000 (08:45 +0200) | ||
committer | JazzyNico <nicoduf@yahoo.fr> | |
Sun, 28 Mar 2010 06:45:18 +0000 (08:45 +0200) |
share/extensions/uniconv_output.py | patch | blob | history |
index ffd78736b3d4c0fadc23ec464b80a1003d3ee5f5..9cdac7fc28ac77b79f466c1b501fc2fab497afa8 100644 (file)
def get_command():
cmd = None
-try:
- from subprocess import Popen, PIPE
- p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait()
- if p==0 :
- cmd = 'uniconvertor'
- else:
- p = Popen('uniconv', shell=True, stdout=PIPE, stderr=PIPE).wait()
+ try:
+ from subprocess import Popen, PIPE
+ p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait()
if p==0 :
- cmd = 'uniconv'
-except ImportError:
- from popen2 import Popen3
- p = Popen3('uniconv', True).wait()
- if p!=32512 : cmd = 'uniconv'
- p = Popen3('uniconvertor', True).wait()
- if p!=32512 : cmd = 'uniconvertor'
+ cmd = 'uniconvertor'
+ else:
+ p = Popen('uniconv', shell=True, stdout=PIPE, stderr=PIPE).wait()
+ if p==0 :
+ cmd = 'uniconv'
+ except ImportError:
+ from popen2 import Popen3
+ p = Popen3('uniconv', True).wait()
+ if p!=32512 : cmd = 'uniconv'
+ p = Popen3('uniconvertor', True).wait()
+ if p!=32512 : cmd = 'uniconvertor'
if cmd == None:
# there's no succeffully-returning uniconv command; try to get the module directly (on Windows)
'and install into your Inkscape\'s Python location\n'))
sys.exit(1)
cmd = 'python -c "from uniconvertor import uniconv; uniconv();"'
+
return cmd
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 encoding=utf-8 textwidth=99