dir(..) vs. PyList_GetItem

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Apr 19 00:04:29 EDT 2000

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	   +--------------------------------------+

More information about the Python-list mailing list