[C++-sig] Embedding and calling extended python commands

Satyajit Sarangi ssarangi123 at gmail.com
Fri Nov 30 00:26:56 CET 2007


Hi All,
          I am new to the boost python api and had a few basic questions
where I got stuck.

I am writing an application in C++ which has modules written so that they
can be invoked in a command type format.
For example commands like,

draw_line(),
draw_circle()

etc are implemented. I compiled these with boost python to the corresponding
.lib and .pyd

After that I write a simple script which imports the module and then calls
these commands.

for example..

import mymodule

draw_line()
draw_circle()

-----------------------------------------------------------------------------------------------------------

Now can the embedded python interpreter to call this file as a regular
script or do I need any changes.

I tried doing it this way and it gives me a lot of errors though I can
import the module with regular python interpreter.

Am sorry for such a stupid question but I am stuck at it. I will really
appreciate any help.
thanks
Satyajit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20071129/24523560/attachment.htm>


More information about the Cplusplus-sig mailing list