python commmand line params from c++

Thu Jun 30 21:49:30 CEST 2005

Ummm, just a guess from looking at the output (not familiar with C++
the error seems to complain about what's in, not the call to
What's in

"Wesley Henwood" <wesleyhenwood at> wrote in message
news:1120143124.925422.290980 at
> What is the proper way to pass command line parameters to a python
> script called from C++? I'm tryng this:
> path = "c:\\someDir\\ param1 param2 param3";
> PyRun_SimpleFile(PyFile_AsFile( PyFile_FromString( path, "r")),
> "");
> I'm getting a "format error, line 1" when the code is
> executed.
> Note: The strange appearannce of the 3 python function calls nested is
> not a bug, but required to prevent a run-time error.

More information about the Python-list mailing list