[Tutor] First steps with Tkinter

catherine curley catherine.curley at gmail.com
Thu Jan 26 23:41:50 CET 2006


Alan

As a matter of interest, did you have much knowledge of Python before you
tried TKinter?  I'm only a python beginner at present.

Catherine


On 1/26/06, etrade.griffiths at dsl.pipex.com <etrade.griffiths at dsl.pipex.com>
wrote:
>
> Hi!
>
> Just started trying to get to grips with Python and Tkinter.  Have
> Frederick
> Lundh's tutorial and am on program hello2.py which looks like this
>
> # File: hello2.py
>
> from Tkinter import *
>
> class App:
>
>    def __init__(self, master):
>
>        frame = Frame(master)
>        frame.pack()
>
>        self.button = Button(frame, text="QUIT", fg="red", command=
> frame.quit)
>        self.button.pack(side=LEFT)
>
>        self.hi_there = Button(frame, text="Hello", command=self.say_hi)
>        self.hi_there.pack(side=LEFT)
>
>    def say_hi(self):
>        print "hi there, everyone!"
>
> root = Tk()
>
> app = App(root)
>
> root.mainloop()
>
> I am running from inside Pythonwin 2.4 IDE under XP Pro and every time I
> run
> hello2.py it freezes when I press "QUIT".  The only way to kill it is
> through
> Alt-Ctrl-Del but this crashes Pythonwin.  Any workaround for this so that
> I
> can use Tkinter from inside the IDE?  BTW the same thing happend with IDLE
>
> Thanks in advance
>
> Alun Griffiths
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060126/fc14a99f/attachment.html 


More information about the Tutor mailing list