akonsu wrote:
hello,
is there a way to determine the file location of a loaded module?
assuming it is not built in.
import settings
print settings
produces: <module 'settings' from 'd:\ko\mysite\settings.pyc'>
i would like to get to this path somehow other than by parsing the
string representation of the module. is there a property on
types.ModuleType? i could not find anything...
thanks
konstantin
The property is called __file__
So in this case, filename = settings.__file__
--
http://mail.python.org/mailman/listinfo/python-list