1. James Rutherford
  2. egg_inspector

Overview

Usage:

% egg_inspector.py -h                           
Usage: egg_inspector.py [options]

Options:
  -h, --help            show this help message and exit
  -p PATTERN, --pattern=PATTERN
                        egg file name pattern to use (eg: "memcached")
  -l, --list            list contents of egg file
  -c CAT, --cat=CAT     cat contents of a named source file within an egg file

% python egg_inspector.py -p django
more than one match, please be more specific:
 - /usr/local/lib/python2.6/dist-packages/Django-1.1.1-py2.6.egg
 - /usr/local/lib/python2.6/dist-packages/django_reversion-1.2-py2.6.egg
 - /usr/local/lib/python2.6/dist-packages/django_registration-0.7-py2.6.egg
 - /usr/local/lib/python2.6/dist-packages/django_profiles-0.2-py2.6.egg

% python egg_inspector.py -p django_registration -l | head
/usr/local/lib/python2.6/dist-packages/django_registration-0.7-py2.6.egg
 - registration/urls.pyc
 - registration/tests.py
 - registration/views.py
 - registration/models.pyc
 - registration/tests.pyc
 - registration/__init__.py
 - registration/urls.py
 - registration/admin.py
 - registration/admin.pyc

% python egg_inspector.py -p django_registration -c registration/admin.py
from django.contrib import admin

from registration.models import RegistrationProfile


class RegistrationAdmin(admin.ModelAdmin):
    list_display = ('__unicode__', 'activation_key_expired')
    search_fields = ('user__username', 'user__first_name')


admin.site.register(RegistrationProfile, RegistrationAdmin)