Can anyone tell me if pygame and Tkinter can work together?

Nathan Pinno falcon3166 at
Sat Nov 19 01:18:24 CET 2005

Even its from one or two external libraries like Tkinter and pygame? I 
prefer to load what I need, not to constantly have to call it by its library 
dot its_name. It makes easier coding for me. I try to keep my code as simply 
as possible. Wonder if its possible to use a Tkinter question to make a 
pygame run again (example being you get killed on a level and you want to 
play again without exiting)?

For great sites go to:
MSN Messenger: falcon3166 at hotmail,com
Yahoo! Messenger: spam_swatter31
ICQ: 199020705
AIM: f3mighty
"Fredrik Lundh" <fredrik at> wrote in message 
news:mailman.757.1132171839.18701.python-list at
> Nathan Pinno wrote:
>> It's a warning that says:
>> Can only use * in top level or something like that.
>> It's kind of annoying
> why?  importing tons of unknown stuff into a local namespace is
> rather silly, and makes it impossible for the compiler to properly
> analyze your code -- which means that you cannot use nested
> scoping.  the language reference says:
>    The from form with "*" may only occur in a module scope.
>    If the wild card form of import -- "import *" -- is used in a
>    function and the function contains or is a nested block with
>    free variables, the compiler will raise a SyntaxError.
> future versions of Python will most likely issue a SyntaxError also
> for "import *" in non-nested functions.
>> but the program still ran after I made the import * lines top level,
>> and removed the def's.
> moving the "import *" line to the module scope would have been
> enough; functions can refer to module-level variables just fine.
> you might wish to read up on Python scoping rules:
> </F>


  >   Posted thru AtlantisNews - Explore EVERY Newsgroup  <
  >  --  Lightning Fast!!!  <
  >   Access the Most Content * No Limits * Best Service  <

More information about the Python-list mailing list