We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3b8c92b + 3dc10f4 commit 012e672Copy full SHA for 012e672
1 file changed
.ipython/profile_default/startup/10-autoreload.py
@@ -1,7 +1,9 @@
1
-#
2
-try:
3
- get_ipython().run_line_magic("load_ext", "autoreload")
4
- get_ipython().run_line_magic("autoreload", "-p", "1")
+from IPython.core.getipython import get_ipython
+
+ipython = get_ipython()
5
+if ipython is not None:
6
+ ipython.run_line_magic("load_ext", "autoreload")
7
+ ipython.run_line_magic("autoreload", "2")
8
9
print(" Automatically enabled autoreload")
-except Exception:
- pass # Not running inside IPython
0 commit comments