from what i understand, the __name__ property of a module is only set to main if the module is being run by itself. For example:
__name__ does equal '__main__' in this case... $> python MyModule.py BUT in the following situation... $>python >>>import MyModule.py __name__ DOES NOT equal '__main__' so your if statement is false, and you never define Resume, so python yells at you :) hope it helps, Felix On Dec 4, 2007 12:44 PM, airton arantes <[EMAIL PROTECTED]> wrote: > Hello, I'm making a simple program like an example, but it isn't > working. take a look: > > [1] http://paste.ubuntu-nl.org/46844/ > [2] http://paste.ubuntu-nl.org/46842/ > [3] http://paste.ubuntu-nl.org/46843/ > > > [1] is the gladefile > [2] is the main file > [3] is other file to be called from main file > > All time that I execute, I get it: > > raceback (most recent call last): > File "projeto.py", line 24, in button1_clicked > run() > File "/home/airton/Desktop/projeto/resume.py", line 29, in run > main = Resume() > NameError: global name 'Resume' is not defined > > > I don't know to fix this. I would like some help. > > thanks a lot. > > -- > ツAirton Arantes ツ > (82)3032-2596 | > (82)9129-5360 > > http://airtonarantes.blogspot.com/ > Linux User#423859 > ---->USE LINUX - BE HAPPY<----- > _______________________________________________ > pygtk mailing list [email protected] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ >
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
