On Friday 16 November 2007 10:28:25 am Xavier Gnata wrote: > 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 :(
This was fixed a while back in svn, but thanks for the report. It turns out that --version does return only the version number. Darren ------------------------------------------------------------------------- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users