<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Sorry to interrupt you again !</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I understand your standpoint, but don't know the specific
steps to implement those.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2><FONT color=#0000ff>add new variables</FONT> to it before
calling PyRun_String(), ------------- how to do it
?</FONT></DIV>
<DIV><FONT size=2><FONT color=#0000ff>try accessing them</FONT> from inside the
executed python script. ---------- How ?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Regards,</FONT></DIV>
<DIV><FONT size=2>Blade</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>----- Original Message ----- </FONT>
<DIV><FONT size=2>From: "Stefan Seefeld" <</FONT><A
href="mailto:seefeld@sympatico.ca"><FONT
size=2>seefeld@sympatico.ca</FONT></A><FONT size=2>></FONT></DIV>
<DIV><FONT size=2>To: "Blade" <</FONT><A
href="mailto:blast2001@21cn.com"><FONT size=2>blast2001@21cn.com</FONT></A><FONT
size=2>>; "Development of Python/C++ integration" <</FONT><A
href="mailto:c++-sig@python.org"><FONT size=2>c++-sig@python.org</FONT></A><FONT
size=2>></FONT></DIV>
<DIV><FONT size=2>Sent: Monday, April 18, 2005 11:31 AM</FONT></DIV>
<DIV><FONT size=2>Subject: Re: [C++-sig] Ask for help .</FONT></DIV></DIV>
<DIV><FONT size=2><BR></FONT></DIV><FONT size=2>> Blade wrote:<BR>> >
Thanks for your answer!<BR>> > <BR>> > Further: how to
bind the C++ variables into the dictionary with boost.python
not using Python/C API ?<BR>> > <BR>> > I have not
found the boost.python Doc mentioned these.<BR>> > Could you
give me some hints or some relative resource ?<BR>> > Are there
any open source projects using python for script language for
reference ?<BR>> <BR>> You may want to look into the 'embedded.cpp' test
that ships with the boost sources, i.e.<BR>>
'boost/libs/python/test/embedding.cpp'. It shows how the 'main_namespace'
dictionary<BR>> is constructed before being passed to a call to
'PyRun_String()'. Try some modifications,<BR>> i.e. add new variables to it
before calling PyRun_String(), and then try accessing them<BR>> from inside
the executed python script.<BR>> <BR>> Regards,<BR>> Stefan<BR>>
</FONT></BODY></HTML>