30 lines
497 B
Python
30 lines
497 B
Python
from .ConsoleApplication import ConsoleApplication
|
|
|
|
class REPLApplication (ConsoleApplication):
|
|
|
|
def _start_internal(self):
|
|
|
|
while (True):
|
|
# print ("open instance attribute relationship close")
|
|
inp = input(self.get_prompt())
|
|
|
|
if inp == "clear":
|
|
self.clear()
|
|
continue
|
|
|
|
elif inp == "exit":
|
|
break
|
|
|
|
elif inp == "help":
|
|
|
|
continue
|
|
|
|
self.process_input(inp)
|
|
|
|
exit(0)
|
|
|
|
def get_prompt(self):
|
|
return "> "
|
|
|
|
def process_input(self, value):
|
|
pass |