SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] ghostscript version fix

From: Darren D. <dar...@co...> - 2007年10月31日 14:03:35
On Tuesday 30 October 2007 09:33:53 pm Ralf Gommers wrote:
> 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
Thanks for the report. This was already fixed in svn, but not using --version, 
which looks like a better solution. Could someone using AFPL ghostscript let 
us know what is the output of gs --version?
Darren

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /