running gui py script

Verde Denim tdldev at
Wed Dec 26 21:07:27 CET 2012

I'm learning py in this environment -
PyCrust 0.9.5 - The Flakiest Python Shell
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2

When I type a tkinter program in pycrust (or pyshell), it executes as
expected, but when I call it from a command line, it doesn't. What I'm
getting back is this -

Traceback (most recent call last):
  File "", line 2, in <module>
    class myapp_tk(Tkinter.Tk):
  File "", line 14, in myapp_tk
    app = myapp_tk(None)
NameError: name 'myapp_tk' is not defined

Trying to call the file in pycrust doesn't seem to work for me either.
If I invoke pycrust either as
$ pycrust ./ or
$ pycrust < ./

the editor opens, but with an empty buffer.

What is it that I'm not understanding?

Thanks, as always for the help.

More information about the Python-list mailing list