traits_futures.ets_event_loop module

Event loop with toolkit selection matching that of ETS.

This module provides an IEventLoop implementation that’s determined in the same way that the toolkit is determined for TraitsUI and Pyface, using the ETS_TOOLKIT environment variable if set, and examining the available toolkits if not.

class traits_futures.ets_event_loop.ETSEventLoop[source]

Bases: object

IEventLoop implementation with lazily-determined toolkit.

The first time this event loop is used, an appropriate toolkit will be selected.

The toolkit selection mechanism used matches that used by Pyface, and is based on the value of the ETS_TOOLKIT environment variable, followed an examination of the available setuptools entry points under the entry point group “traits_futures.event_loops”.

helper()[source]

Return a new event loop helper.

Returns:

event_loop_helper

Return type:

IEventLoopHelper

pingee(on_ping)[source]

Return a new pingee.

Parameters:

on_ping – Zero-argument callable, called on the main thread (under a running event loop) as a result of each ping sent. The return value of the callable is ignored.

Returns:

pingee

Return type:

IPingee

property toolkit_event_loop

Find and fix the toolkit, using the same mechanism that Pyface uses to find its toolkits.