python commmand line params from c++

Wesley Henwood wesleyhenwood at hotmail.com
Thu Jun 30 15:16:08 EDT 2005


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-time libs.

The problem is a bit strange and should be adressed, it's documented
somewhere on the Python site, but no solution is given. That I had to
find by trial and error.  Even better would be a function such as
PyRun_File(char *filename), and do away with handling the FILE
structure altogether.




More information about the Python-list mailing list