def do_tui (self, line):
'''Shows a graphical console\n'''
parser = parsing_opts.gen_parser(self,
"tui",
self.do_tui.__doc__,
parsing_opts.XTERM)
opts = parser.parse_args(line.split())
if opts is None:
return
if opts.xterm:
if not os.path.exists('/usr/bin/xterm'):
print(format_text("XTERM does not exists on this machine", 'bold'))
return
info = self.stateless_client.get_connection_info()
exe = './trex-console --top -t -q -s {0} -p {1} --async_port {2}'.format(info['server'], info['sync_port'], info['async_port'])
cmd = ['/usr/bin/xterm', '-geometry', '111x49', '-sl', '0', '-title', 'trex_tui', '-e', exe]
# detach child
self.terminal = subprocess.Popen(cmd, preexec_fn = os.setpgrp)
return
with self.stateless_client.logger.supress():
self.tui.show()
评论列表
文章目录