I am looking for the init.py file for django. I tried whereis and find, but I get a lot of dirs.
A thousand times THANK YOU!
Kevin
2009-07-08 01:45:27
+5
A:
you can just print it out.
>>> import django
>>> print django.__file__
/var/lib/python-support/python2.5/django/__init__.pyc
>>>
or:
import inspect
import django
print inspect.getabsfile(django)
sunqiang
2009-07-08 02:26:58
A:
This (or something like this) also works when you are searching for files in other packages:
$ dpkg -L python-django | grep __init__.py
0x89
2009-08-09 16:50:09