python commmand line params from c++
- From: "Wesley Henwood" <wesleyhenwood@xxxxxxxxxxx>
- Date: 30 Jun 2005 07:52:04 -0700
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" 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.
.
- Follow-Ups:
- Re: python commmand line params from c++
- From: ej
- Re: python commmand line params from c++
- From: Denis S. Otkidach
- Re: python commmand line params from c++
- Prev by Date: Re: map vs. list-comprehension
- Next by Date: Re: When someone from Britain speaks, Americans hear a "British accent"...
- Previous by thread: Open the command line within a script
- Next by thread: Re: python commmand line params from c++
- Index(es):
Relevant Pages
|