[Tutor] function and module

Kent Johnson kent37 at tds.net
Fri Dec 8 12:08:49 CET 2006

Alan Gauld wrote:
> There are a couple of possibilities.
> 1) if you can import the moduile into a >>> propmpt you could 
> ask abc where it's from.
>>>> print abc.__file__ should work

__file__ is a module attribute, not a function attribute. abc.__module__ 
will give the name of the module abc is from.


More information about the Tutor mailing list