[Tutor] pylab Failure

Kent Johnson kent37 at tds.net
Sun Oct 12 15:17:49 CEST 2008


On Sun, Oct 12, 2008 at 7:56 AM, Wayne Watson
<sierra_mtnview at sbcglobal.net> wrote:
> The terminal window flashed briefly, and apparently never got to the
> finish() def, which should keep the window open, but long enough to see
> there's nothing in it. The program came directly from the MatPlotLib web
> page. Another one died in a similar way. I put finish() after the plot line
> and it died the same way. Same if I put it before plot. Same before arrange.
> Dies same way with only the import line. There must be something wrong with
> the matplot module install?

When Alan says to run the program from a terminal window, he means,
- open terminal
- type the command to run your program - something like
> C:\Python24\python \path\to\myprogram.py

This is different from just double-clicking the program, the terminal
window will stay open.

You could also open a terminal window and just run Python, then type
or paste the pylab commands into the interpreter. I.e., run terminal,
then type
> \Python24\python
>>> from pylab import *

etc.

IIUC it is a bad idea to run a Tkinter program from IDLE, it can get a
bit confused. That may be the reason for your original error.

Kent


More information about the Tutor mailing list