Fw: [C++-sig] Ask for help .
Blade
blast2001 at 21cn.com
Tue Apr 19 09:50:30 CEST 2005
Sorry to interrupt you again !
I understand your standpoint, but don't know the specific steps to implement those.
add new variables to it before calling PyRun_String(), ------------- how to do it ?
try accessing them from inside the executed python script. ---------- How ?
Regards,
Blade
----- Original Message -----
From: "Stefan Seefeld" <seefeld at sympatico.ca>
To: "Blade" <blast2001 at 21cn.com>; "Development of Python/C++ integration" <c++-sig at python.org>
Sent: Monday, April 18, 2005 11:31 AM
Subject: Re: [C++-sig] Ask for help .
> Blade wrote:
> > Thanks for your answer!
> >
> > Further: how to bind the C++ variables into the dictionary with boost.python not using Python/C API ?
> >
> > I have not found the boost.python Doc mentioned these.
> > Could you give me some hints or some relative resource ?
> > Are there any open source projects using python for script language for reference ?
>
> You may want to look into the 'embedded.cpp' test that ships with the boost sources, i.e.
> 'boost/libs/python/test/embedding.cpp'. It shows how the 'main_namespace' dictionary
> is constructed before being passed to a call to 'PyRun_String()'. Try some modifications,
> i.e. add new variables to it before calling PyRun_String(), and then try accessing them
> from inside the executed python script.
>
> Regards,
> Stefan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050419/242f4528/attachment.htm>
More information about the Cplusplus-sig
mailing list