mirror of
https://github.com/lloeki/wasp.git
synced 2025-12-06 10:44:39 +01:00
repl cleanup
This commit is contained in:
parent
f809e0c0cd
commit
32978d0273
1 changed files with 6 additions and 2 deletions
8
repl.py
8
repl.py
|
|
@ -2,8 +2,6 @@ import wasp
|
||||||
import wasp.parser
|
import wasp.parser
|
||||||
import readline
|
import readline
|
||||||
|
|
||||||
readline.parse_and_bind("tab: complete")
|
|
||||||
|
|
||||||
|
|
||||||
class Reader(object):
|
class Reader(object):
|
||||||
def __init__(self, prompt, banner=None):
|
def __init__(self, prompt, banner=None):
|
||||||
|
|
@ -25,6 +23,12 @@ class Reader(object):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
readline.parse_and_bind("tab: complete")
|
||||||
|
|
||||||
|
# TODO: autocomplete, someday
|
||||||
|
# http://stackoverflow.com/questions/5637124
|
||||||
|
#readline.set_completer(complete)
|
||||||
|
|
||||||
for line in Reader(">> ", banner="WASP %s" % wasp.VERSION):
|
for line in Reader(">> ", banner="WASP %s" % wasp.VERSION):
|
||||||
if line == "" or line is None:
|
if line == "" or line is None:
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue