Changeset 6231
- Timestamp:
- 09/14/07 17:16:14 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/management/commands/shell.py
r6075 r6231 1 import os 1 2 from django.core.management.base import NoArgsCommand 2 3 from optparse import make_option … … 44 45 readline.set_completer(rlcompleter.Completer(imported_objects).complete) 45 46 readline.parse_and_bind("tab:complete") 47 48 # We want to honor both $PYTHONSTARTUP and .pythonrc.py, so follow system 49 # conventions and get $PYTHONSTARTUP first then import user. 50 if not use_plain: 51 pythonrc = os.environ.get("PYTHONSTARTUP") 52 if pythonrc and os.path.isfile(pythonrc): 53 try: 54 execfile(pythonrc) 55 except NameError: 56 pass 57 # This will import .pythonrc.py as a side-effect 58 import user 46 59 code.interact(local=imported_objects)
