[BangPypers] Calling Python script from C++.

steve steve at lonetwin.net
Fri Feb 26 10:10:39 CET 2010


On 02/25/2010 07:32 PM, lakshmi.chowdam at bt.com wrote:
> Hi Zubin,
> [...snip...]
> In the function definition, I am taking 1 hard coded variable and needs
> to pass this variable along with the string(python code) to
> PyRun_SimpleString() and execute it.
> Could you tell me the solution how to map the argument to the
> string(python code) and pass to PyRun_SimpleString() and execute
> successfully?

Is there any specific reason you choose to read the entire file and execute it 
using PyRun_SimpleString() as opposed to the more traditional and standard 
methods of using fork()+exec*() or system() functions ?

- steve

random non tech spiel: http://lonetwin.blogspot.com/
tech randomness: http://lonehacks.blogspot.com/
what i'm stumbling into: http://lonetwin.stumbleupon.com/

More information about the BangPypers mailing list