[Tutor] Importing question

Alan Gauld alan.gauld at btinternet.com
Sat Jul 14 08:58:20 CEST 2007


"Kent Johnson" <kent37 at tds.net> wrote

> You can find out where any module is located using its __file__
> attribute. This works for modules written in C, too.

But not on Windoze. If it's built-in there is no __file__ attribute.
But the print trick tells you if it's builtin and if it's not __file__ 
works.

Alan G.




More information about the Tutor mailing list