Skip to content

Commit c7eace3

Browse files
committed
Add idle trigger to python REPL
1 parent 7390d16 commit c7eace3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

base/Beryllium/bin/python.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"rest_a": "common",
1111
"echo": "common",
1212
"prefix": ">>> ",
13+
"idle": 4,
1314
}
1415
term.buf[1] = ""
1516

@@ -177,5 +178,10 @@
177178
term.buf[1] = ""
178179
pv[get_pid()]["mass"].clear()
179180
term.focus = 0
181+
elif term.buf[0] == 4:
182+
term.buf[1] = ""
183+
term.focus = 0
184+
break
185+
180186
dmtex("Python shell session has ended")
181187
be.api.setvar("return", "0")

0 commit comments

Comments
 (0)