Run some tasks in IPython Notebook in detached mode Run some tasks in IPython Notebook in detached mode python python

Run some tasks in IPython Notebook in detached mode


I normally use the linux command screen, which opens a different shell that can run in the background.

For example, when you first enter your shell you type 'screen'. It then gives you a new terminal. Start ipython there with the above command. Once it is running, on your keyboard press CTRL+A CTRL+D. The program then starts running in the background and you can close the terminal. If you want to get back to it, type 'screen -r' in the command line.


I don't know if this is new in IPython 1.0, but in my IPython notebook, if I call your function f(), and close the browser, the kernel is running in the background and after a while (I changed to time.sleep(10)) I see the results.txt file generated. I don't think the kernel, which you usually start in a console, stops when you close the browser window. Let me know if I am mistaken.