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)
|
ipshell(global_ns=dict(), local_ns=context)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# 0.12+
|
# 0.12+
|
||||||
from IPython import embed
|
from IPython.terminal.ipapp import TerminalIPythonApp
|
||||||
embed(banner1=banner, user_ns=context)
|
app = TerminalIPythonApp.instance()
|
||||||
|
app.extensions = ['autoreload']
|
||||||
|
app.exec_lines = ['%autoreload 2']
|
||||||
|
app.display_banner = False
|
||||||
|
print(banner)
|
||||||
|
app.initialize(argv=[])
|
||||||
|
app.start()
|
||||||
return
|
return
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue