I work on a machine per ssh where I run ipython
for interactive work. Can I start a long-running Python function from IPython, sever the ssh connection and log back in later into the IPython session to observe the result?
Yes. Use screen
, tmux
(superior), or similar software. Both use the concept of sessions that you attach to and detach from.
With tmux
:
tmux
and then ipython
.<Ctrl+b> d
to detach. You're back in the normal shell.tmux attach
will take you back to ipython
.Using screen, the commands are screen
, <Ctrl+a> <Ctrl+d>
and screen -r
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With