Hi,
Quoting matplotlib/__init__.py :
def checkdep_ghostscript():
try:
if sys.platform == 'win32':
command = 'gswin32c -v'
else:
command = 'gs -v'
stdin, stdout = os.popen4(command)
line = stdout.readlines()[0]
v = line.split()[2]
vtest = '.'.join(v.split('.')[:2]) # deal with version numbers
like '7.07.1'
float(vtest)
return vtest
except (IndexError, ValueError):
return None
It fails on debian sid because 'gs -v' returns "GPL Ghostscript SVN
PRE-RELEASE 8.61 (2007-08-02)\n"
Anyway, the parser will be ugly because it has to deal with version
numbers like '7.07.1'.
Should I propose a trivial patch to get thinks working on debian sid ?
Xavier
ps :Why is there no standard way (like -v or --version) on *unix to get
the version *number*?? Only the version number. Why :(
--
############################################
Xavier Gnata
CRAL - Observatoire de Lyon
9, avenue Charles André
69561 Saint Genis Laval cedex
Phone: +33 4 78 86 85 28
Fax: +33 4 78 86 83 86
E-mail: [EMAIL PROTECTED]
############################################
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users