always load autoreload in shell
This commit is contained in:
parent
904ed06349
commit
c3ecb178cf
1 changed files with 8 additions and 2 deletions
|
@ -219,8 +219,14 @@ def command_shell(*args):
|
|||
ipshell(global_ns=dict(), local_ns=context)
|
||||
except ImportError:
|
||||
# 0.12+
|
||||
from IPython import embed
|
||||
embed(banner1=banner, user_ns=context)
|
||||
from IPython.terminal.ipapp import TerminalIPythonApp
|
||||
app = TerminalIPythonApp.instance()
|
||||
app.extensions = ['autoreload']
|
||||
app.exec_lines = ['%autoreload 2']
|
||||
app.display_banner = False
|
||||
print(banner)
|
||||
app.initialize(argv=[])
|
||||
app.start()
|
||||
return
|
||||
except ImportError:
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue