diff options
-rw-r--r-- | gr-wxgui/python/wxgui/stdgui2.py | 3 | ||||
-rw-r--r-- | grc/python/flow_graph.tmpl | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/gr-wxgui/python/wxgui/stdgui2.py b/gr-wxgui/python/wxgui/stdgui2.py index d983dd58cd..53b389dd3c 100644 --- a/gr-wxgui/python/wxgui/stdgui2.py +++ b/gr-wxgui/python/wxgui/stdgui2.py @@ -22,7 +22,6 @@ '''A simple wx gui for GNU Radio applications''' import ctypes -import os import wx import sys from gnuradio import gr @@ -36,7 +35,7 @@ class stdapp (wx.App): self._nstatus = nstatus self._max_noutput_items = max_noutput_items # If we're on Linux, also enable multi-threading Xlib access - if os.name == 'posix': + if sys.platform.startswith('linux'): try: x11 = ctypes.cdll.LoadLibrary('libX11.so') x11.XInitThreads() diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl index cf13317d1d..5751b1450f 100644 --- a/grc/python/flow_graph.tmpl +++ b/grc/python/flow_graph.tmpl @@ -280,8 +280,8 @@ $short_id#slurp if __name__ == '__main__': #if $generate_options in ('wx_gui', 'qt_gui') import ctypes - import os - if os.name == 'posix': + import sys + if sys.platform.startswith('linux'): try: x11 = ctypes.cdll.LoadLibrary('libX11.so') x11.XInitThreads() |