Embedding Python with Dynamic Loading (win)

Simon Steele ssnews at softel.co.uk
Mon Jan 5 09:03:22 EST 2004


Hi,

I'm trying to embed python into my application, and have everything
working fine using the static import lib. However, I don't want my
application to be dependant on python being installed (it's an
optional script interpreter). Therefore I want to be able to
dynamically load python instead (which I believe is possible, but I
can't find any examples for). It seems, however, that the import lib
is imported in python.h using a pragma statement.

1. Is there any suggested way to prevent this import without modifying
python.h?

2. Does anyone have a modified python.h which uses LoadLibrary /
dlopen that they'd be willing to share to save me from writing my own?

3. Has anyone had any success dynamically loading python and using
swig modules in the same process (just to check I'm not insane for
trying this)?

thanks in advance,

Simon.

-- 
Simon Steele
Programmers Notepad - http://www.pnotepad.org/



More information about the Python-list mailing list