dir(..) vs. PyList_GetItem

Mark Pope M_Pope at shef.rage.co.uk
Wed Apr 19 04:15:39 EDT 2000


The code I posted was just a snippet.
I have already successfully imported the module. I now need to get a list of
the functions it exposes.
I want the equivalent of calling 'dir(myScript)' for the C API

> -----Original Message-----
> From: Greg Ewing [mailto:greg at cosc.canterbury.ac.nz]
> Sent: 19 April 2000 5:04 AM
> To: python-list at python.org
> Subject: Re: dir(..) vs. PyList_GetItem
> 
> 
> Mark Pope wrote:
> > 
> >         pModule = PyModule_New( "myScript" );
> 
> That doesn't import the module, it just creates an 
> empty module. You want
> 
>    pModule = PyImport_ImportModule("myScript");
> 
> -- 
> Greg Ewing, Computer Science Dept,
> +--------------------------------------+
> University of Canterbury,	   | A citizen of 
> NewZealandCorp, a	  |
> Christchurch, New Zealand	   | wholly-owned subsidiary of 
> USA Inc.  |
> greg at cosc.canterbury.ac.nz	   
+--------------------------------------+
> -- 
> http://www.python.org/mailman/listinfo/python-list
> 




More information about the Python-list mailing list