Stef Mientki <stef.mientki <at> gmail.com> writes: > I don't seem to have pkg_utils, > only pkgutil, which doesn't have an apropiate function. > > But I found another way, don't know if that's reliable: > import inspect > print inspect.currentframe().f_code.co_filenameE
Eeek. > head -999 foo/* ==> foo/__init__.py <== import pkg_resources print pkg_resources.resource_string(__name__, "bar") ==> foo/bar <== bar > python -c "import foo" bar Make a "def load_resource" from that print line and you're done. -- http://mail.python.org/mailman/listinfo/python-list