Django

Code

Ticket #3381: trunk-ibr-pystartup-20070128-2331.diff

File trunk-ibr-pystartup-20070128-2331.diff, 0.8 kB (added by Baurzhan Ismagulov <ibr@radix50.net>, 3 years ago)
  • trunk.orig/django/core/management.py

    old new  
    11941194            # we already know 'readline' was imported successfully. 
    11951195            import rlcompleter 
    11961196            readline.parse_and_bind("tab:complete") 
    1197         code.interact() 
     1197        console = code.InteractiveConsole() 
     1198        filename = os.environ.get("PYTHONSTARTUP") 
     1199        if filename and os.path.isfile(filename): 
     1200            source = open(filename, "r").read() 
     1201            code=compile(source, filename, "exec") 
     1202            console.runcode(code) 
     1203        console.interact() 
    11981204run_shell.args = '[--plain]' 
    11991205 
    12001206def dbshell():