using Tkinter from IDLE

N

neutrinman

How do I use Tkinter from IDLE? Tkinter can be used from IDLE attached
to python 2.2, IDLE 0.8. But I couldn't use from IDLE attached to
python 2.3, IDLE 1.0.3. When I execute the code below:
from Tkinter import *
root = Tk()
the window appears form IDLE 0.8, but not from IDLE 1.0.3.
 
R

Russell Blau

How do I use Tkinter from IDLE? Tkinter can be used from IDLE attached
to python 2.2, IDLE 0.8. But I couldn't use from IDLE attached to
python 2.3, IDLE 1.0.3. When I execute the code below:
from Tkinter import *
root = Tk()
the window appears form IDLE 0.8, but not from IDLE 1.0.3.

Add the line:

root.mainloop()

at the end of your code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top