fsleyes_widgets.utils¶
This package contains a collection of small utility modules for doing random things. A few functions are also defined at the package level:
wxversion |
Determines the version of wxPython being used. |
isalive |
Returns True if the given wx.Window object is “alive” (i.e. |
-
fsleyes_widgets.utils.WX_PYTHON= 1¶ Constant returned by the
wxversionfunction, indicating that wxPython 3.0.2.0 or older is being used.
-
fsleyes_widgets.utils.WX_PHOENIX= 2¶ Constant returned by the
wxversionfunction, indicating that wxPython/Phoenix (>= 3.0.3) is being used.
-
fsleyes_widgets.utils.wxversion()¶ Determines the version of wxPython being used. Returns either
WX_PYTHONorWX_PHOENIX.
-
fsleyes_widgets.utils.isalive(widget)¶ Returns
Trueif the givenwx.Windowobject is “alive” (i.e. has not been destroyed),Falseotherwise. Works in both wxPython and wxPython/Phoenix.Warning
Don’t try to test whether a
wx.MenuItemhas been destroyed, as it will probably result in segmentation faults. Check the parentwx.Menuinstead.