Total python embedding in a c/c++ app

Achim Domma achim.domma at syynx.de
Sun Jul 7 05:09:36 EDT 2002


Hi,

I have written some kind of Python Server Pages for IIS. The main code is a
dll loaded by the IIS. This dll hosts a python interpreter, which allows the
executed scripts to access my own C++ functionality via the usual server,
request and response objects. Using boost.python V1 I have done the
following steps:

- implement your core functionality in C++
- use boost.python to create a module which provides classes, which allow
you to access your C++ functionality
- in your main program create the python interpreter
- import your new module
- create instances of the C++ classes developed to access the core
functionality
- add them to the current interpreter
- then execute a python script

The Script will now be able to call methods of your objects, which will
execute code from your core functionality. You may look at boost.python
(www.boost.org) for the C++ wrapping part. I have done all this with version
1, but version 2 will be release soon.

Achim

"tALSit" <talsit at talsit.org> wrote in message
news:3d27c9f9 at dnews.tpgi.com.au...
> Damm... I'm just reading this email, and I realise that it makes very
little
> sense. Anyway, anyone that has totally embedded python into their system,
I
> would be extreemly gratefull to know how they went about doing it, thanks!






More information about the Python-list mailing list