<!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>Hi everyone,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> I am a new boost.python user. I am trying to extend and
embed python with my C++ application.<BR> now I encounter the following
problem:<BR> My do steps:<BR> 1. Write a simple python extend
module(library).<BR> 2. Write some python scripts according to extend
module.<BR> 3. In my application, call PyRun_SimpleString function to
execute the scripts. It works well.<BR> <BR><FONT color=#0000ff>My
question</FONT>: how to exchange info or access variable(defined in C++
application or Python script) between C++ and scripts?<BR> That
is to say: in scripts, how to access global variable which has been defined in
C++ main application ?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Could someone show me a example ?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks in advance,<BR>Martin</FONT></DIV></BODY></HTML>