o
    ¯b  ã                   @   sB   d Z ddlZe d¡ ddlmZ G dd„ dƒZdd„ ZdgZdS )	aØ  Old method of wxPython support for Twisted.

twisted.internet.wxreactor is probably a better choice.

To use::

    | # given a wxApp instance called myWxAppInstance:
    | from twisted.internet import wxsupport
    | wxsupport.install(myWxAppInstance)

Use Twisted's APIs for running and stopping the event loop, don't use
wxPython's methods.

On Windows the Twisted event loop might block when dialogs are open
or menus are selected.

Maintainer: Itamar Shtull-Trauring
é    NzBwxsupport is not fully functional on Windows, wxreactor is better.)Úreactorc                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚwxRunnerz!Make sure GUI events are handled.c                 C   s
   || _ d S )N)Úapp)Úselfr   © r   ú</usr/lib/python3/dist-packages/twisted/internet/wxsupport.pyÚ__init__"   s   
zwxRunner.__init__c                 C   s:   | j  ¡ r| j  ¡  | j  ¡ s| j  ¡  t d| j¡ dS )z^
        Execute pending WX events followed by WX idle events and
        reschedule.
        ç{®Gáz”?N)r   ÚPendingÚDispatchÚProcessIdler   Ú	callLaterÚrun)r   r   r   r   r   %   s
   


ÿ
zwxRunner.runN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s    r   c                 C   s   t | ƒ}t d|j¡ dS )z4Install the wxPython support, given a wxApp instancer	   N)r   r   r   r   )r   Úrunnerr   r   r   Úinstall3   s   r   )r   ÚwarningsÚwarnÚtwisted.internetr   r   r   Ú__all__r   r   r   r   Ú<module>   s   

