Hi,
Sometimes a question about CDR importing back to the
inkscape-brasil maling-list and the problem is the uniconversor
name variation. To support this variation i put a test on
uniconv-ext.py . I don't know if i did by the better way, but
the result is really better for the user now. :-)
Somebody may please test it on Windows and OSX?
(i have comited to SVG, update+make to test)
import sys
from run_command import run
from subprocess import Popen, PIPE
cmd = 'none'
try:
p = Popen('uniconv', shell=True, stdout=PIPE, stderr=PIPE).wait()
if p!=127 : cmd = 'uniconv'
p = Popen('uniconvertor', shell=True, stdout=PIPE, stderr=PIPE).wait()
if p!=127 : cmd = 'uniconvertor'
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' :
sys.stderr.write('You need to install the UniConvertor software.\n'+\
'For Linux: install the packge python-uniconvertor.\n'+\
'For Windows: download it from\n'+\
'http://sk1project.org/modules.php?name=Products&product=uniconvertor\n')
else :
run((cmd+' "%s" "%%s"') %
sys.argv[1].replace("%","%%"), "UniConvertor")
Thanks,
Aurium
--
Aurélio A. Heckert
http://colivre.coop.br/Aurium
GNU/Linux User #312507
http://counter.li.org
- - - - - - - - - - - - - - - - - - - - - - - - -
Ilustração Vetorial Livre:
http://InkscapeBrasil.org
Coop. de Tecnologias Livres:
http://Colivre.coop.br
- - - - - - - - - - - - - - - - - - - - - - - - -
"Eu temo pela minha espécie quando penso
que Deus é justo." Thomas Jefferson
Antes de imprimir esta mensagem reflita
sobre a sua responsabilidade com a
preservação do Meio Ambiente.