[pygtk] How to open a window from of other?
Seltzer
squabbit7 at gmail.com
Wed Dec 5 17:43:16 WST 2007
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 <airton.arantes at gmail.com> 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 pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20071205/8b81a3e9/attachment.htm
More information about the pygtk
mailing list