IPython can remedy all your wonderings :)

http://matplotlib.sourceforge.net/users/shell.html

-- Gökhan

Hi Gökhan,

I am not very familiar with iPython (I am not opposed to learning either).

What I have in mind is writing code that I can call from a terminal, as opposed to interactively as with iPython. However, in iPython, can you have a module/script running, and asking me as the user for input? I have assumed iPython is similar to an interactive Python interpreter. With the knowledge I have, I can not, while in interactive mode, launch a sub routine that will ask me for input. Is this possible to do (in either Python or iPython)?


Thanks,

Andre




On Sep 24, 2009, at 8:44 PM, Gökhan Sever wrote:



On Thu, Sep 24, 2009 at 7:25 PM, Andre Walker-Loud <walksl...@gmail.com > wrote:
Hi All,

I have what I think is a basic question.  I want to have an
interactive python script/code which uses matplotlib.  For example,
the script first asks what data set to use, then when received, it
does some analysis routines, and then makes some plots.  To launch the
plot, my I have in my routine

 > #!/usr/bin/python (I am not running in interactive mode, rather I
made an executable script)
 > import matplotlib.pyplot as plt

some analysis stuff

 > plt.show()


after the plt.show() command, the terminal I run the script from
becomes unresponsive until I close plot I made.  However, I would like
instead to be able to continue interacting with the program.  For
example, choosing a fitting window based upon the first plot.  But I
don't want to have to close down the plot to do this.  So my
question(s):

1 - how do I continue to interact with the terminal (and my program
asking for more imput) after the plt.show() command has been issued?

2 - is there an alternative command I can use instead of plt.show()
which does not lock up the terminal?

3 - is it possible to launch more than one matplotlib plotting window
with the same interactive python session (executable python script)?


I thought perhaps the answer to my question would be to have a sub-
script executed by my main one which generates the various plots I
want, where each successive plot requires user input after viewing the
previous ones.

Any thoughts/advice are appreciated.


Thanks,

Andre

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

IPython can remedy all your wonderings :)

http://matplotlib.sourceforge.net/users/shell.html

--
Gökhan

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to