Hi all,
I just installed mpl on ubuntu gutsy, and got errors after setting
text.usetex : True and ps.usedistiller : ghostscript. The problem seems
to be in checkdep_ghostscript() in __init__.py, specifically the command 'gs
-v' (should be replaced by 'gs --version').
For my system I get:
$ gs -v
GPL Ghostscript SVN PRE-RELEASE 8.61 (2007-08-02)
Copyright (C) 2007 Artifex Software, Inc. All rights reserved.
and:
$ gs --version
8.61
Below I give a modified version of checkdep_ghostscript() that should work
for all version of ghostscript.
Cheers,
Ralf
def checkdep_ghostscript():
try:
if sys.platform == 'win32':
command = 'gswin32c -v'
else:
command = 'gs --version'
stdin, stdout = os.popen4(command)
line = stdout.readlines()[0]
vtest = '.'.join(line.split('.')[:2]) # deal with version numbers like '
7.07.1'
float(vtest)
return vtest
except (IndexError, ValueError):
return None
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel