|
From: John H. <jdh...@ac...> - 2004-09-28 12:51:05
|
>>>>> "Alan" == Alan G Isaac <ai...@am...> writes:
Alan> ii. running prepared scripts for prepared graphical
Alan> illustrations. Here I will usually have several figures
Alan> that I want displayed sequentially. With interactive=False,
Alan> this approach seems to work fine: I close a figure and the
Alan> next appears (TKAgg). With interactive=True (and the show
Alan> commands removed), this approach seems to choke with an
Alan> abnormal program termination: Fatal Python Error:
Alan> PyEval_RestoreThread: NULL tstate
What environment / shell / OS are you running in?
Could you send me an example script so I can try it?
Alan> Since I wish to do both, I decided I shd have
Alan> interactive:False in my rc file. Am I overlooking
Alan> something?
ipython is well suited to this task. In the pylab mode, it sets
matplotlib to be in interactive mode in your backend of choice. If
you want to run a matplotlib script from within the interactive
session, type
>>> run somescript.py
and it will transiently set interactive : False for the execution of
the script, and then restore your interactive setting. So perhaps it
will give you the best of both interactive mode and script mode, under
one roof?
JDH
|