Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44282

Re: My gui

Date 2013-04-24 14:08 -0400
From Ned Batchelder <ned@nedbatchelder.com>
Subject Re: My gui
References <09b96d6b-6db3-42a2-88d3-5fe16984fed1@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.1029.1366826929.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 4/24/2013 1:08 PM, Daniel Kersgaard wrote:
> Today, being the last day of lectures at school, my instructor ran briefly through Tkninter and GUIs. I'd been looking forward to this particular lesson all semester, but when I got home and copied a sample program from my textbook verbatim, IDLE does nothing. No error, no nothing. Any ideas? Here  is the code from my program. I'm not sure if this is appropriate, but suggestions are helpful.
>
> import tkinter
> import tkinter.messagebox
>
> class MyGui:
>      def_init_(self):

You need to define __init__, not _init_.  Python special methods are 
named with double underscore leading and trailing, and __x__ is 
pronounced "dunder-x".

--Ned.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

My gui Daniel Kersgaard <danielkersgaard@gmail.com> - 2013-04-24 10:08 -0700
  Re: My gui Dave Angel <davea@davea.name> - 2013-04-24 13:46 -0400
  Re: My gui Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2013-04-24 19:53 +0200
  Re: My gui Ned Batchelder <ned@nedbatchelder.com> - 2013-04-24 14:08 -0400
  Re: My gui Arnaud Delobelle <arnodel@gmail.com> - 2013-04-24 20:42 +0100
    Re: My gui Neil Cerutti <neilc@norwich.edu> - 2013-04-24 20:26 +0000
  Re: My gui Terry Jan Reedy <tjreedy@udel.edu> - 2013-04-24 22:51 -0400
  Re: My gui Chris Angelico <rosuav@gmail.com> - 2013-04-25 13:17 +1000

csiph-web