Wayne Watson wrote:
> The developer stated this in a msg this morning.
> Either way should work.  Double clicking the py file is probably more 
> convenient, but you can more easily see error messages if  you open it 
> with IDLE

option 3:
   Start it up in a command window (DOS box on Windows), and then you 
won't have the mainloop interaction issues, and you'll see the output.

open a dos box, cd to the directory where your script is, and type:

python name_of_script.

If it can't find python, then you need to tell it where to look by 
adding it to your PATH or typing the whole thing:

C:\Python25\bin\python.exe

or something like that (not on Windows at the moment)

Note that this is not an MPL issue it is an IDLE (and many other IDEs) 
issue -- any Python IDE that runs your code in the same process as the 
IDE itself is going to have these issues.

IPython has gone to great pains to make interactive use with GUI 
programs work -- I don't any other tool that has.

Wayne Watson wrote:
> That link has no reference to tkinter.  tk and tk2, plus a few others 
> with tk in their names, but nothing else.A search in the box produced 
> nothing.

tkinter is the python binding to the Tk GUI toolkit -- so tkiniter and 
tk mean about the same thing when talking about Python.

Wayne Watson wrote:
> Thanks for the info. I'm semi-resistant to ipython. I tried if for a few 
> hours, and it seemed a bit too much like linux.

ipython is an interactive command line interface to Python -- it is much 
nicer than the raw interpreter, but it is what it is, and it is very 
good at it. It can be very helpful to experiment with stuff in an 
interactive environment, but once you go beyond tiny stuff, you need to 
write a program. To do that you need an editor, and a wya to run and 
debug it. An IDE integrates these functions, and there are many of them.

Personally, I use an editor to edit the code, the commend line (or 
IPython) to run the code, and do most of my debugging with print statements.

I suggest you take a bit of a break from the problem at hand, and go 
through a couple intro tutoroal sit python, write a couple small 
programs (tkinter-based, if that's what you're going to need), and get a 
handle on how to do it.

> lot, and enjoyed it. I'll consider it. Windows is the game now.

frankly, not all that different from a programming in Python point of view.

> Yes, actual use is good, but the needed imports seem a bit baffling. 
> scipy, pylab, matplotlib, ...? What components do  I only need for a 
> particular use?

you need what you need -- you need numpy for amost eveything you'll ever 
do if you work with numbers. You need matplotlib if you need to plot, 
you need scipy if you need any of the more complicated numerical 
routines it provides. pyplot dumps a bunch of these into the same 
namespace, which is nice for interactive use, but I"d stay away from it 
for writing programs.

Wayne Watson wrote:
>  I'm assuming that I don't
> want to use import matplotlib a lot, but something selectively like from 
> matplotlib.image import AxesImage, or from matplotlib.plot import 
> figure, show. What did I miss in my Python upbringing?

It's really a matter of taste. YOu either do:

import matplotlib

fig = matplotlib.figure

or from matplotlib import figure

fig = figure.

You'll need a lot of things in matplotlib if you're doing much of 
anything, and "namespaces are one honking great idea", so I do:

import matplotlib as mpl

fig = mpl.figure()

etc..

HTH,

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

chris.bar...@noaa.gov

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to