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

josef.pktd@gmai... josef.pktd@gmai...
Wed Aug 25 09:34:56 CDT 2010


On Wed, Aug 25, 2010 at 10:17 AM, Almar Klein <almar.klein@gmail.com> wrote:
>
>> 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,

Done this and it works, I can successfully "run file" several times in
the same shell without restarting.

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.

this restarts the interpreter which I don't always want.

A cosmetic problem is that I have many cells because IDLE uses ## for
commenting out a block.

I haven't found the Command history yet.

Thanks,

Josef
>
> Thanks for reporting this!
>   Almar
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>


More information about the SciPy-User mailing list