Darren Dale wrote: > 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 > > Unfortunately, I'm not able to get the svn version working : imshow always fails : /usr/lib/python2.4/site-packages/matplotlib/pyplot.py in imshow(*args, **kwargs) 1673 hold(h) 1674 try: -> 1675 ret = gca().imshow(*args, **kwargs) 1676 draw_if_interactive() 1677 except:
/usr/lib/python2.4/site-packages/matplotlib/axes.py in imshow(self, X, cmap, norm, aspect, interpolation, alpha, vmin, vmax, origin, extent, shape, filternorm, filterrad, imlim, **kwargs) 4435 im.autoscale_None() 4436 -> 4437 xmin, xmax, ymin, ymax = im.get_extent() 4438 4439 corners = (xmin, ymin), (xmax, ymax) /usr/lib/python2.4/site-packages/matplotlib/image.py in get_extent(self) 286 sz = self.get_size() 287 #print 'sz', sz --> 288 numrows, numcols = sz 289 if self.origin == 'upper': 290 return (-0.5, numcols-0.5, numrows-0.5, -0.5) ValueError: need more than 1 value to unpack but it is another topic. Xavier. > ------------------------------------------------------------------------- > 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 > > -- ############################################ 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users