[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] From * import * and Pygame2exe
> > It was my understanding that using "from" would place those values in
> > the local namespace, and not increase in size unless I introduce new
> > variables.
>
> Yes, it imports the vars into your local namespace, but the module will also
> hang around in the sys.modules namespace.
Ah, that makes sense. I'm a bit annoyed, but I'm sure it's for a good reason.
> If the module's been compiled, then the module
> import will be faster (it still has to exec, but the compilation is done).
> You can mimic this by using the marshal module (which exists to write
> compiled modules).
That's another thing I was thinking, was generating pyc files and
exec'ing them. This would also make cheating by looking at the room
data somewhat less trivial.
--
Andrew Ulysses Baker
"failrate"