[EMAIL PROTECTED] wrote:
> John Machin wrote:
>> > PyObject *_argv = PyImport_ImportModule("sys.argv");
>>
>> What does the name of the function tell you? You can't do that in one
>> hit. Start with
>> PyObject *_sys = PyImport_ImportModule("sys");
>> then you need to get the module's argv attribut
John Machin wrote:
> > PyObject *_argv = PyImport_ImportModule("sys.argv");
>
> What does the name of the function tell you? You can't do that in one
> hit. Start with
> PyObject *_sys = PyImport_ImportModule("sys");
> then you need to get the module's argv attribute.
I just figured this out, doh
> PyObject *_argv = PyImport_ImportModule("sys.argv");
What does the name of the function tell you? You can't do that in one
hit. Start with
PyObject *_sys = PyImport_ImportModule("sys");
then you need to get the module's argv attribute.
However a better design might be have your extension module
Hi,
How would one go about getting sys.argv fom within the context of a C
API extention module? I want to pass it along to C library that I'm
calling from my module code.
TIA~
I'm trying to load the sys module using:
PyObject *_argv = PyImport_ImportModule("sys.argv");
but it is coming back N