Re: python commmand line params from c++

2005-06-30 Thread Wesley Henwood
Thanks Denis. PySys_SetArgv should do the trick. The nested function calls are there because the FILE structrure produced by fopen is not always compatible with the FILE structure produced by the Python C++ functions. Something do with the Python C being built with different version ofthe c run-

Re: python commmand line params from c++

2005-06-30 Thread ej
Ummm, just a guess from looking at the output (not familiar with C++ interface)... the error seems to complain about what's in someScript.py, not the call to it. What's in someScript.py? "Wesley Henwood" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What is the proper way to pass

Re: python commmand line params from c++

2005-06-30 Thread Wesley Henwood
Thanks Denis. PySys_SetArgv should do the trick. The nested function calls are there because the FILE structrure produced by fopen is not always compatible with the FILE structure produced by the Python C++ functions. Something do with the Python C being built with different version ofthe c run-

Re: python commmand line params from c++

2005-06-30 Thread Denis S. Otkidach
On 30 Jun 2005 07:52:04 -0700 "Wesley Henwood" <[EMAIL PROTECTED]> wrote: > What is the proper way to pass command line parameters to a python > script called from C++? I'm tryng this: Have you tried PySys_SetArgv? > path = "c:\\someDir\\someScript.py param1 param2 param3"; > PyRun_SimpleFile(Py

python commmand line params from c++

2005-06-30 Thread Wesley Henwood
What is the proper way to pass command line parameters to a python script called from C++? I'm tryng this: path = "c:\\someDir\\someScript.py param1 param2 param3"; PyRun_SimpleFile(PyFile_AsFile( PyFile_FromString( path, "r")), "someScript.py"); I'm getting a "format error someScript.py, line 1"