DEV Community


How to set autoreload in IPython at startup? Cheatsheet

・1 min read

This is for windows 10.

  1. Press Win+R keys --> get run dialog
  2. Type %USERPROFILE% and press enter
  3. Navigate to .ipython folder, if you don't see one, following steps doesn't help
  4. From there navigate to folder profile_default/startup
  5. Create a file named
  6. Copy paste following lines of code in that file:

    from IPython import get_ipython
    ipython = get_ipython() 
    if "__IPYTHON__" in globals(): 
        ipython.magic("load_ext autoreload") 
        ipython.magic("autoreload 2")
  7. Save the file and open ipython it shall now autoreload

Discussion (0)