link vs import

Alex Martelli aleaxit at
Fri May 25 15:46:07 CEST 2001

"Brian Rowe" <roweb004 at> wrote in message
news:wmrP6.6041$WI.2004620 at
> Hello,
> I've got a program that imbeds the python interpreter.  I have also made
> an extension module, so the scripts can call funcitions within my
> program.  I would like to know if the python interpreter will have access
> to this module if I link it into my program at compile time (vice doing an
> import from within the interpreter at run time).
> If there is a way to allow it to have access, then how do you do it?

PyImport_AppendInittab will let you add your module to the
table of "built-in" modules.  PyImport_ImportModule lets
you "load" it.  You may then place an entry for it in
module '__builtin__' or wherever you wish.  Is that what
you mean...?


More information about the Python-list mailing list