interactive client: avoid messing up the input line
- trigger a redraw of the input line when asynchronous log messages arrive + do not print traceback on 'remote' errors + persistent readline history Change-Id: If85fd064c1c09c44e0cb0ebccbfc1b6411ad5aac Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30793 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -25,14 +25,14 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import code
|
||||
import argparse
|
||||
from os import path
|
||||
|
||||
# Add import path for inplace usage
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
from frappy.client.interactive import Client, watch
|
||||
from frappy.client.interactive import Client, watch, Console
|
||||
|
||||
|
||||
def parseArgv(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
@ -47,6 +47,7 @@ def parseArgv(argv):
|
||||
nargs='*', type=str, default=[])
|
||||
return parser.parse_args(argv)
|
||||
|
||||
|
||||
_USAGE = """
|
||||
Usage:
|
||||
%s
|
||||
@ -101,4 +102,4 @@ if success:
|
||||
print('skipping interactive mode')
|
||||
exit()
|
||||
print(_USAGE % _usage_args)
|
||||
code.interact(banner='', local=sys.modules['__main__'].__dict__)
|
||||
Console(sys.modules['__main__'].__dict__)
|
||||
|
Reference in New Issue
Block a user