Improve developer console.
parent
33efb379ad
commit
826c13db98
|
@ -23,11 +23,14 @@ Please mail me (~desvox) for feedback and for any of your
|
||||||
from network import BBJ, URLError
|
from network import BBJ, URLError
|
||||||
from string import punctuation
|
from string import punctuation
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from sys import argv, version
|
||||||
from time import time, sleep
|
from time import time, sleep
|
||||||
from getpass import getpass
|
from getpass import getpass
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
from random import choice
|
from random import choice
|
||||||
from sys import argv
|
from code import interact
|
||||||
|
import rlcompleter
|
||||||
|
import readline
|
||||||
import tempfile
|
import tempfile
|
||||||
import urwid
|
import urwid
|
||||||
import json
|
import json
|
||||||
|
@ -2240,16 +2243,9 @@ class ActionBox(urwid.ListBox):
|
||||||
elif keyl == "f12":
|
elif keyl == "f12":
|
||||||
app.loop.stop()
|
app.loop.stop()
|
||||||
call("clear", shell=True)
|
call("clear", shell=True)
|
||||||
try:
|
readline.set_completer(rlcompleter.Completer().complete)
|
||||||
line = input("(REPL)> ")
|
readline.parse_and_bind("tab: complete")
|
||||||
while line:
|
interact(banner=version + "\n(BBJ Interactive Console)", local=globals())
|
||||||
try:
|
|
||||||
print(eval(line))
|
|
||||||
except BaseException as E:
|
|
||||||
print(E)
|
|
||||||
line = input("(REPL)> ")
|
|
||||||
except EOFError:
|
|
||||||
pass
|
|
||||||
app.loop.start()
|
app.loop.start()
|
||||||
|
|
||||||
elif app.mode == "thread" and not app.window_split and not overlay:
|
elif app.mode == "thread" and not app.window_split and not overlay:
|
||||||
|
|
Loading…
Reference in New Issue