From 898fadae0e9bf9d0eb46abf286a888d791bdaf96 Mon Sep 17 00:00:00 2001 From: imarom Date: Tue, 12 Jan 2016 09:47:24 -0500 Subject: perfectionist's job is never done - fixed the console prompt redraw when an async event occurs so it looks nice --- scripts/automation/trex_control_plane/console/trex_console.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/automation/trex_control_plane/console/trex_console.py') diff --git a/scripts/automation/trex_control_plane/console/trex_console.py b/scripts/automation/trex_control_plane/console/trex_console.py index 49d58fe0..3e9dec47 100755 --- a/scripts/automation/trex_control_plane/console/trex_console.py +++ b/scripts/automation/trex_control_plane/console/trex_console.py @@ -116,6 +116,8 @@ class TRexConsole(TRexGeneralCmd): def __init__(self, stateless_client, verbose=False): self.stateless_client = stateless_client + self.stateless_client.set_prompt_redraw_cb(self.prompt_redraw) + TRexGeneralCmd.__init__(self) self.tui = trex_tui.TrexTUI(stateless_client) @@ -130,6 +132,9 @@ class TRexConsole(TRexGeneralCmd): ################### internal section ######################## + def prompt_redraw (self): + sys.stdout.write(self.prompt) + def verify_connected(f): @wraps(f) def wrap(*args): -- cgit 1.2.3-korg