[Tutor] function and module
Alan Gauld
alan.gauld at btinternet.com
Fri Dec 8 19:55:47 CET 2006
"Kent Johnson" <kent37 at tds.net> 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.
Oops! Thanks for the catch Kent.
Alan G.
More information about the Tutor
mailing list