FAQ
I'm just starting to tinker with embedding Python in a C app and I'm having
trouble getting PyImport_ImportModuleEx() to import [*] of a module into
__main__.

More specifically: I can get it to import the module fine as a separate
namespace, but, just for the sake of thinking I know what I'm doing, I
wanted to import all the module's functions into __main__'s namespace.

I guess you could also say I'm looking for the PyImport_ version of this
line:

PyRun_SimpleString("from TestScript import *\n");

I was thinking some combination of PyImport_ImportModuleEx would do the
trick but haven't been able to figure it out.

Am I missing one or more points here?

Thanks.

Charlie Barrows
Gabriel Interactive

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMar 15, '01 at 7:37p
activeMar 15, '01 at 7:37p
posts1
users1
websitepython.org

1 user in discussion

Charlie Barrows: 1 post

People

Translate

site design / logo © 2022 Grokbase