path to python file given module

Gene genezhang at
Mon Jan 10 01:06:08 CET 2005

Is there a way to get a relative or absolute path to a python file once
it's been imported as a module?

For example, I type:
>>> import filegen

and I want a string that represents the path to (either
relative to current working directory or the absolute path)

More information about the Python-list mailing list