using Tkinter from IDLE

Discussion in 'Python' started by neutrinman@myrealbox.com, Mar 3, 2005.

Guest

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.

Advertisements

<> wrote in message
news:...
> 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.

--
I don't actually read my hotmail account, but you can replace hotmail with
excite if you really want to reach me.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!