views:

476

answers:

3

I am looking for the init.py file for django. I tried whereis and find, but I get a lot of dirs.

+2  A: 

http://ubuntuforums.org/showthread.php?t=627773

harto
A thousand times THANK YOU!
Kevin
+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
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