Newbie import probelm..
Diez B. Roggisch
nospam-deets at web.de
Tue Feb 3 07:17:49 EST 2004
>>>> import invoker
>>>> x=invoker()
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: 'module' object is not callable
>>>>
Try
x=invoker.invoker()
The thing is that you declared the _class_ invoker in a file also invoker.
That makes
import invoker
create a module named invoker, where all the things defined in invoker.py
are located. Try
>>>import invoker
>>>dir(invoker)
Regards,
Diez
More information about the Python-list
mailing list