def run():
validate_osenvironment()
print_banner()
cli_buffer = OSBuffer()
ltobj = OSLayout(multiwindow=False)
application = Application(
style=PygmentsStyle(OSStyle),
layout=ltobj.layout,
buffers=cli_buffer.buffers,
on_exit=AbortAction.RAISE_EXCEPTION,
key_bindings_registry=OSKeyBinder.registry)
cli = CommandLineInterface(application=application,
eventloop=create_eventloop())
while True:
try:
document = cli.run(reset_current_buffer=True)
process_document(document)
except KeyboardInterrupt:
# A keyboardInterrupt generated possibly due to Ctrl-C
print "Keyboard Interrupt Generated"
continue
except EOFError:
print "cntl-D"
sys.exit()
评论列表
文章目录