style = p.get_string('wxgui', 'style', 'auto')
# In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback
-if style == 'auto':
- style = 'nongl'
+# Currently, anything other than 'gl' means 'nongl'
-if style == 'nongl':
- from fftsink_nongl import fft_sink_f, fft_sink_c
-elif style == 'gl':
+if style == 'gl':
try:
import wx.glcanvas
except ImportError:
raise RuntimeError("Unable to import OpenGL. Are Python wrappers for OpenGL installed?")
from fftsink_gl import fft_sink_f, fft_sink_c
+
+else:
+ from fftsink_nongl import fft_sink_f, fft_sink_c
style = p.get_string('wxgui', 'style', 'auto')
# In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback
-if style == 'auto':
- style = 'nongl'
+# Currently, anything other than 'gl' means 'nongl'
-if style == 'nongl':
- from scopesink_nongl import scope_sink_f, scope_sink_c, constellation_sink
-elif style == 'gl':
+if style == 'gl':
try:
import wx.glcanvas
except ImportError:
raise RuntimeError("Unable to import OpenGL. Are Python wrappers for OpenGL installed?")
from scopesink_gl import scope_sink_f, scope_sink_c, constellation_sink
+
+else:
+ from scopesink_nongl import scope_sink_f, scope_sink_c, constellation_sink
style = p.get_string('wxgui', 'style', 'auto')
# In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback
-if style == 'auto':
- style = 'nongl'
+# Currently, anything other than 'gl' means 'nongl'
-if style == 'nongl':
- from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c
-elif style == 'gl':
+if style == 'gl':
try:
import wx.glcanvas
except ImportError:
raise RuntimeError("Unable to import OpenGL. Are Python wrappers for OpenGL installed?")
from waterfallsink_gl import waterfall_sink_f, waterfall_sink_c
+
+else:
+ from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c