path to python file given module

Gene genezhang at
Sun Jan 9 19:06:08 EST 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