hplgit / scitools

Additional scientific computing functionality in Python - extensions to NumPy/SciPy++
http://hplgit.github.io/scitools/doc/web/index.html
Other
64 stars 30 forks source link

small problem caused by 'new' 2.6 keywords ('where' and 'as') #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. installation w/ this config: (i) gnuplot 1.8 backend; (ii) python 2.6;
(iii) Mac OX 10.5.6; (iv) SciPy 0.70; (v) NumPy 1.30.  The second is the
critical for the purpose.

2. 'testing' the install by  attempting to import the entire module
contents "from scitools.all import *"

Throws an error due to the presence of variable names that are now Python
2.6 keywords ("where" and "as").

This seems to solve the problem just fine:  simple search-and-replace edits
of two files in the "easyviz" directory, common.py and gnuplot_.py.  change
"where" to "where0" and "as" to "as0".  The two edited files are attached;
SciTools now runs just fine with these two files replacing the extant
common.py and gnuplot_.py files.

Original issue reported on code.google.com by doug.ybarbo@gmail.com on 7 Apr 2009 at 11:40

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report, however, this is already fixed in the Subversion 
repository.
We will try to make a new release in not too long time.

BTW: I guess you mean "with" and not "where"?

Original comment by johannes...@gmail.com on 24 Apr 2009 at 10:07

GoogleCodeExporter commented 9 years ago
I tried to do that, now i get:
Traceback (most recent call last):
  File "graf.py", line 10, in <module>
    mesh(x,z1,z2)
  File "/usr/local/lib/python2.6/dist-packages/scitools/easyviz/common.py", line
3817, in mesh
    self._replot()
  File "/usr/local/lib/python2.6/dist-packages/scitools/easyviz/gnuplot_.py", line
1010, in _replot
    shading=ax.getp('shading')))
  File "/usr/local/lib/python2.6/dist-packages/scitools/easyviz/gnuplot_.py", line
710, in _add_surface
    binary=0)
  File "/usr/lib/python2.6/dist-packages/Gnuplot/PlotItems.py", line 748, in GridData
    return _FIFOFileItem(content, **keyw)
  File "/usr/lib/python2.6/dist-packages/Gnuplot/PlotItems.py", line 468, in __init__
    _FileItem.__init__(self, '', **keyw)
  File "/usr/lib/python2.6/dist-packages/Gnuplot/PlotItems.py", line 304, in __init__
    PlotItem.__init__(self, **keyw)
  File "/usr/lib/python2.6/dist-packages/Gnuplot/PlotItems.py", line 120, in __init__
    self.set_option(**keyw)
  File "/usr/lib/python2.6/dist-packages/Gnuplot/PlotItems.py", line 146, in set_option
    raise Errors.OptionError('%s=%s' % (option,value))
Gnuplot.Errors.OptionError: with0=l palette

I probably did something wrong, any help please?

Original comment by aleks4nd...@hotmail.com on 28 Apr 2009 at 3:49

GoogleCodeExporter commented 9 years ago

Original comment by johannes...@gmail.com on 10 Sep 2009 at 11:49