GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.EventLoopActivator
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.EventLoopActivator — wxPython 4.3.2 Docs

phoenix_title wx.EventLoopActivator¶

Makes an event loop temporarily active.

You normally don’t need to use this class before calling wx.EventLoopBase.Run , as Run() already uses it. Use this class only when an event loop must be temporarily active without entering Run(), or from a custom Run() implementation which doesn’t call the base class version.

This class is used to make the event loop active during its life-time, e.g.:

class MyEventLoop(wx.EventLoopBase):

    def RunMyLoop(self):

        loop = MyEventLoop()
        activate = wx.EventLoopActivator(loop)

     # other code...

     # the previously active event loop restored here

See also

wx.EventLoopBase


class_hierarchy Class Hierarchy¶

Inheritance diagram for class EventLoopActivator:

Inheritance diagram of EventLoopActivator


method_summary Methods Summary¶

__init__

Makes the loop passed as the parameter currently active.

__enter__

__exit__


api Class API¶

class wx.EventLoopActivator(object)¶

Possible constructors:

EventLoopActivator(loop) -> None

Makes an event loop temporarily active.


Methods¶

__init__(self, loop)¶

Makes the loop passed as the parameter currently active.

This saves the current return value of wx.EventLoopBase.GetActive and then calls wx.EventLoopBase.SetActive with the given loop.

Parameters:

loop (wx.EventLoopBase)

Return type:

None



__enter__(self)¶


__exit__(self, exc_type, exc_val, exc_tb)¶
© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.