[C++-sig] embedded python ?

Stefan Seefeld seefeld at sympatico.ca
Fri Apr 3 20:55:32 CEST 2009


mad city wrote:
> Just starting out with boost-python. I have a python script that I 
> want to call from C++ code. I have the quickstart example working. I'm 
> running into a problem. The python script I'm calling includes import 
> statements - for example 'import os', and these are causing an exception
>
> ImportError: __import__ not found  

Not having seen your code, I'd suggest you start by looking at the 
existing tests that use the functionality you want. In this case, this 
means the 'import' and 'exec' tests in boost/libs/python/test.

It's generally most likely to get help if you provide some details, such 
as a chunk of code that we could run to reproduce the issue.

Regards,
       Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list