Using Tkinter

Scott David Daniels Scott.Daniels at Acm.Org
Sat Aug 23 09:55:07 EDT 2008


J-Burns wrote:
> Hello. Im a bit new to using Tkinter and im not a real pro in
> programming itself... :P. Need some help here.

OK, looks like you are getting direct answers, but I thought I'd
mention an easy way to experiment with Tkinter programming.

If you start Idle with the "-n" switch (*), then anything you do shares
the same "mainloop" as Idle, and your window manipulation is "live".
This means, that immediately after typing in:
     >>> import Tkinter
     >>> f = Tkinter.Frame()

You will see the frame f show up.  You can experiment directly with
watching the effects of calls that you make in the interactive
interpretter.

(*) Easy way to do this:
On some systems, associate a button with "pythonw -m idlelib.idle -n".
On a Windows system with an Idle shortcut/button/icon already:
   Copy the shortcut/button/icon
   Right-click the shortcut and select the "properties" menu.
   On the "General" tab of the Properties window:
     Give the shortcut a nicer name (I use Idle25-n for mine).
   On the "Shortcut" tab of the properties window, add a space and a -n
     to the target line.
   Click OK, and try out your new button.

--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list