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:
Determines the version of wxPython being used. |
|
Returns |
-
fsleyes_widgets.utils.
WX_PYTHON
= 1¶ Constant returned by the
wxversion
function, indicating that wxPython 3.0.2.0 or older is being used.
-
fsleyes_widgets.utils.
WX_PHOENIX
= 2¶ Constant returned by the
wxversion
function, indicating that wxPython/Phoenix (>= 3.0.3) is being used.
-
fsleyes_widgets.utils.
wxversion
()¶ Determines the version of wxPython being used. Returns either
WX_PYTHON
orWX_PHOENIX
.
-
fsleyes_widgets.utils.
isalive
(widget)¶ Returns
True
if the givenwx.Window
object is “alive” (i.e. has not been destroyed),False
otherwise. Works in both wxPython and wxPython/Phoenix.Warning
Don’t try to test whether a
wx.MenuItem
has been destroyed, as it will probably result in segmentation faults. Check the parentwx.Menu
instead.