A question?

vin fractal97 at hotmail.com
Sat Sep 8 22:55:03 CEST 2001


Gven  a file exmpl.py

def foo(x,y):
    return x,y;

Why does the following ....

module=PyImport_ImportModule("exmpl");
PyRun_SimpleString("print dir(exmpl)\n");

give ....

Traceback (most recent call last):
  File "<string>", line 1, in ?
NameError: name 'exmpl' is not defined





More information about the Python-list mailing list