[BangPypers] Calling Python script from C++.
Shivaraj M S
shivraj.ms at gmail.com
Wed Mar 3 15:31:15 CET 2010
if this thread is still active -
instead of passing the argument , probably the argument can be extracted
from a temporary file/buffer. a small code can be inserted to the python
code sent as argument to PyRun_SimpleString() to read it.
> On 02/25/2010 07:32 PM, lakshmi.chowdam at bt.com wrote:
>> Hi Zubin,
>> 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
> 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/
> BangPypers mailing list
> BangPypers at python.org
View this message in context: http://old.nabble.com/Re%3A-Calling-Python-script-from-C%2B%2B.-tp27715952p27768904.html
Sent from the BangPypers - Bangalore Python Users Group mailing list archive at Nabble.com.
More information about the BangPypers