If I understand you correctly, you want this: module.__file__
John Nagle wrote: > Python's own loader searches "sys.path" for module names, but is there > some function that makes that search functionality accessible to > Python programs? I need the absolute pathname of a module, with the > search being done exactly the same way "import" does it. The loader for > "egg" files has this functionality, but I'd like to find out if there's > a standard way to do this before looking into that source code. > > Also, it seems that the environment variable "PYTHONPATH" applies to > "import", but not to the starting module named on the Python command > line. Is that correct? Thanks. > > John Nagle > -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list