module file

Rob Wolfe rw at
Fri Jan 12 23:07:19 CET 2007

Imbaud Pierre <pierre.imbaud at> writes:

> I am willing to retrieve the file an imported module came from;
> module.__file__, or inspect.getfile(module) only gives me the
> relative file name. How do I determine the path?

>>> import os
>>> os.path.abspath(module.__file__)


More information about the Python-list mailing list