Search code examples
pythonenthought

Busy/Wait Cursor in enthought traitsui


I am using the traitsui package from enthought. I'm launching a gui like this:

appui = TestBenchUI()
appui.configure_traits()

Where TestBenchUI is a custom gui derived from enthought.traits.api.HasTraits. Some of the gui operations take some time to complete, and I would like the gui to display a wait/busy cursor. I've been unable to determine how to do this. Could someone please enlighten me?

Thanks in advance.


Solution

  • Add this import:

    from enthought.pyface.api import GUI

    Then when you need to show a busy cursor:

    GUI.set_busy()