MORE INFO

mdefreitas at sikorsky.com mdefreitas at sikorsky.com
Wed May 3 14:33:36 EDT 2000


> You're right, it's bad to pass an empty dictionnary as globals.
> If you used PyErr_Print() and other functions, you'd have get
> a nice traceback :-)
> I guess Python tries to find builtins function from globals
> (or at least __import__). Here is a better example:
>
[interesting code snipped...]

I think I see what you are doing, but it seems as though the
global dictionary is being shared between interpreter calls,
which will have the side effect of sharing global variables.

I think we need to send PyRun_File a COPY of the global
dictionary, no? If so, how do we create a copy of a dictionary.
I couldn't find anything like that in C/API document..


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list