importing class

gmarkowsky at gmail.com gmarkowsky at gmail.com
Sun Oct 29 10:47:23 EST 2006


Yep, that fixed it. Many thanks.

Greg

Dennis Lee Bieber wrote:
> On 27 Oct 2006 09:22:00 -0700, gmarkowsky at gmail.com declaimed the
> following in comp.lang.python:
>
> > It's supposed to just make a Tkinter window with two choices. The
> > problem is that when I import it from a module, I get the following
> > error:
> >
> > NameError: global name 'Frame' is not defined
> >
> > But when I copy and paste it into the file, it works. Can anyone tell
> > me what's wrong?
> >
> 	Probably the simple fact that your "file" likely has all the imports
> for Tkinter defined. The module that you are importing needs to have
> those imports inside it -- imported modules do not have visibility of
> names defined in the importING file.
> --
> 	Wulfraed	Dennis Lee Bieber		KD6MOG
> 	wlfraed at ix.netcom.com		wulfraed at bestiaria.com
> 		HTTP://wlfraed.home.netcom.com/
> 	(Bestiaria Support Staff:		web-asst at bestiaria.com)
> 		HTTP://www.bestiaria.com/




More information about the Python-list mailing list