U
    n5{iU  ã                   @   s0   d Z ddlZdd„ Zdddi fdd„ZdgZdS )	zŠ
This module integrates PyUI with twisted.internet's mainloop.

Maintainer: Jp Calderone

See doc/examples/pyuidemo.py for example usage.
é    Nc                 C   s:   t  ¡  t  ¡ dkr&t  ¡  |  ¡  n|  |t| |¡ d S )Nr   )ÚpyuiZdrawÚupdateÚquitÚstopZ	callLaterÚ
_guiUpdate)ÚreactorÚdelay© r	   ú@/tmp/pip-unpacked-wheel-mnhg7r0q/twisted/internet/pyuisupport.pyr      s
    
r   é
   r	   c                 C   s2   t j||Ž}|dkr ddlm} t|| d ƒ |S )z�
    Schedule PyUI's display to be updated approximately every C{ms}
    milliseconds, and initialize PyUI with the specified arguments.
    Nr   )r   g     @�@)r   ÚinitZtwisted.internetr   r   )Úmsr   ÚargsÚkwÚdr	   r	   r
   Úinstall   s
    r   )Ú__doc__r   r   r   Ú__all__r	   r	   r	   r
   Ú<module>   s   		