We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 722a58f commit 3231002Copy full SHA for 3231002
interpreter/core/computer/terminal/languages/jupyter_language.py
@@ -5,6 +5,7 @@
5
6
import ast
7
import logging
8
+import sys
9
import os
10
import queue
11
import re
@@ -19,6 +20,18 @@
19
20
DEBUG_MODE = False
21
22
23
+# Handling the case where the script is called as a kernel
24
+if 'ipykernel_launcher' in sys.argv:
25
+ if sys.path[0] == '':
26
+ del sys.path[0]
27
+
28
+ from ipykernel import kernelapp as app
29
30
+ app.launch_new_instance()
31
+ sys.exit(0)
32
33
34
+# Rest of your Open Interpreter code
35
class JupyterLanguage(BaseLanguage):
36
file_extension = "py"
37
name = "Python"
0 commit comments