[SciPy-User] ANN: IEP, the interactive Editor for Python

Almar Klein almar.klein@gmail....
Wed Aug 25 09:17:41 CDT 2010


> unfortunately it doesn't seem to like my matplotlib setup with Tkinter
> backend on WindowsXP. The file runs without problems in IDLE. Are
> there special options in the matplotlib rc file required?
>
>
> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) on win32.
> This is the IEP interpreterType "help" for help, type "?" for a list of
> *magic*
> commands.
> >>> [executing "firms.py"]
>
> c:\programs\python25\lib\site-packages\matplotlib-0.99.1-py2.5-win32.egg\matplot
> lib\rcsetup.py:117: UserWarning: rcParams key "numerix" is obsolete and has
> no e
> ffect;
>  please delete it from your matplotlibrc file
>  warnings.warn('rcParams key "numerix" is obsolete and has no effect;\n'
> Traceback (most recent call last):
>  File "C:/Josef/eclipsegworkspace/openecon/pyecon/pyecon/micro/firms.py",
> line
> 551, in <module>
>    f1.plot()
>  File "C:/Josef/eclipsegworkspace/openecon/pyecon/pyecon/micro/firms.py",
> line
> 300, in plot
>    pl.plot()
>  File "C:/Josef/eclipsegworkspace/openecon/pyecon/pyecon/micro/firms.py",
> line
> 437, in plot
>    plt.figure()
>  File
> "C:\Programs\Python25\lib\site-packages\matplotlib-0.99.1-py2.5-win32.egg
> \matplotlib\pyplot.py", line 254, in figure
>    # do not solve using profit_function as difficulties with numerical
>  File
> "C:\Programs\Python25\lib\site-packages\matplotlib-0.99.1-py2.5-win32.egg
> \matplotlib\backends\backend_tkagg.py", line 90, in new_figure_manager
>    __call__ returns function values, i.e. total cost
>  File "C:\Programs\Python25\lib\lib-tk\Tkinter.py", line 1631, in __init__
>    baseName = os.path.basename(sys.argv[0])
> IndexError: list index out of range
>


Right, the IEP interpreter sets sys.argv to [], while it should have set it
to ['']. (I used the standard Python shell as an example and must have
misread it). I will fix this bug right now.

In the mean time, you can put "sys.argv = ['']" somewhere before importing
matplotlib, or better yet, put that code in your PYTHONSTARTUP file. Another
option is to run your code as a script, which sets the first element in
sys.argv to the scripts path.

Thanks for reporting this!
  Almar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100825/7de0c5ef/attachment.html 


More information about the SciPy-User mailing list