summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/console/trex_console.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-02-01 17:01:47 +0200
committerimarom <imarom@cisco.com>2017-02-01 17:09:52 +0200
commit693e822b3779d695677d5bdc55a6b87e359285a9 (patch)
tree1b89f8aed136b9d71bef9ad63bfccfa54c5a2e25 /scripts/automation/trex_control_plane/stl/console/trex_console.py
parentc55f150ece248b4439e188cb9c1d9ff3c547b5c2 (diff)
added tests for capture
few tweaks Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/console/trex_console.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/console/trex_console.py27
1 files changed, 1 insertions, 26 deletions
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py
index d36ce7b0..5e68cdf0 100755
--- a/scripts/automation/trex_control_plane/stl/console/trex_console.py
+++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py
@@ -39,7 +39,7 @@ except:
from trex_stl_lib.api import *
from trex_stl_lib.utils.text_opts import *
-from trex_stl_lib.utils.common import user_input, get_current_user
+from trex_stl_lib.utils.common import user_input, get_current_user, set_window_always_on_top
from trex_stl_lib.utils import parsing_opts
from .trex_capture import CaptureManager
@@ -74,31 +74,6 @@ class ConsoleLogger(LoggerApi):
self.flush()
-def set_window_always_on_top (title):
- # we need the GDK module, if not available - ignroe this command
- try:
- if sys.version_info < (3,0):
- from gtk import gdk
- else:
- #from gi.repository import Gdk as gdk
- return
-
- except ImportError:
- return
-
- # search the window and set it as above
- root = gdk.get_default_root_window()
-
- for id in root.property_get('_NET_CLIENT_LIST')[2]:
- w = gdk.window_foreign_new(id)
- if w:
- name = w.property_get('WM_NAME')[2]
- if name == title:
- w.set_keep_above(True)
- gdk.window_process_all_updates()
- break
-
-
class TRexGeneralCmd(cmd.Cmd):
def __init__(self):
cmd.Cmd.__init__(self)