wanwan <[EMAIL PROTECTED]> wrote:
...
> when I run my example, an error shows:
> "NameError: global name'menubar' is not defined"
>
> I wonder why it doesn't work. Isn't that the way to define an object
> variable?
The code you posted should not trigger this error. Most likely problem:
you
oops, of course.
Very careless mistake.
thx
--
http://mail.python.org/mailman/listinfo/python-list
> "wanwan" <[EMAIL PROTECTED]> (w) wrote:
>w> I'm trying to make a GUI, but for some of the instantiated object
>w> variable names, the interpreter is looking at them as global names.
>w> Here is an example of what I did:
>w> class mygui:
>w> def __init__(self, root):
>w>