Can't get Tkinter to run from command line
Steven Sartorius
ssartor at bellatlantic.net
Sat Dec 16 11:22:04 EST 2000
I'm just starting out with Tkinter and have been fooling around with the
following (stored in a file called application.py)....
from Tkinter import *
from ScrolledText import ScrolledText
class gui(Frame):
def createWidgets(self):
self.text = ScrolledText(self)
self.text.pack()
def __init__(self,parent=None):
Frame.__init__(self,parent)
self.pack()
self.createWidgets()
if __name__ == 'main': gui().mainloop()
This code runs fine from within python itself but I get no window if I
run it from the command line (i.e. python application.py).
I'm sure I'm doing something obviously wrong but what???
Any help much appreciated...
Thanks,
Steve
More information about the Python-list
mailing list