1
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
2
# See LICENSE for details.
5
"""This module integrates PyUI with twisted.internet's mainloop.
7
API Stability: unstable
9
Maintainer: U{Jp Calderone<mailto:exarkun@twistedmatrix.com>}
11
See doc/examples/pyuidemo.py for example usage.
17
def _guiUpdate(reactor, delay):
19
if pyui.update() == 0:
23
reactor.callLater(delay, _guiUpdate, reactor, delay)
26
def install(ms=10, reactor=None, args=(), kw={}):
28
Schedule PyUI's display to be updated approximately every C{ms}
29
milliseconds, and initialize PyUI with the specified arguments.
31
d = pyui.init(*args, **kw)
34
from twisted.internet import reactor
35
_guiUpdate(reactor, ms / 1000.0)