Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/twisted_8_1/twisted/internet/pyuisupport.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
2 # See LICENSE for details.
3
4
5 """
6 This module integrates PyUI with twisted.internet's mainloop.
7
8 Maintainer: U{Jp Calderone<mailto:exarkun@twistedmatrix.com>}
9
10 See doc/examples/pyuidemo.py for example usage.
11 """
12
13 # System imports
14 import pyui
15
16 def _guiUpdate(reactor, delay):
17 pyui.draw()
18 if pyui.update() == 0:
19 pyui.quit()
20 reactor.stop()
21 else:
22 reactor.callLater(delay, _guiUpdate, reactor, delay)
23
24
25 def install(ms=10, reactor=None, args=(), kw={}):
26 """
27 Schedule PyUI's display to be updated approximately every C{ms}
28 milliseconds, and initialize PyUI with the specified arguments.
29 """
30 d = pyui.init(*args, **kw)
31
32 if reactor is None:
33 from twisted.internet import reactor
34 _guiUpdate(reactor, ms / 1000.0)
35 return d
36
37 __all__ = ["install"]
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/internet/protocol.py ('k') | third_party/twisted_8_1/twisted/internet/qtreactor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698