importing modules in c

C. Derek Fields (derek@gamekeeper.bellcore.com)
Mon, 12 Sep 94 17:23:17 -0400

I have the following code in c:

else if ((module_ = import_module(name)) == NULL)
return;

run_command("print vars()");

char buf[200];
sprintf(buf,"import %s",name);
run_command(buf);
run_command("print vars()");

and I get the following output:

{'__name__': '__main__', 'sys': <module 'sys'>}
{'sys': <module 'sys'>, 'fgdPriLocDirectD': <module 'fgdPriLocDirectD'>, '__name__': '__main__'}

The output of the first vars() does not show the module, though import_module
claims (by not returning NULL) to have worked.

Then output of the second vars(), after the run_command, does show the
new module.

Can someone explain into which name space the first import_module loads the
new module?

-- 
Derek Fields
(derek@cc.bellcore.com)