/usr/lib/python3/dist-packages/twisted/internet
NameSizeModeActions
iocpreactor/-0755rm
test/-0755rm
__pycache__/-0755rm
abstract.py192740644editdlrm
address.py52460644editdlrm
asyncioreactor.py105530644editdlrm
base.py442600644editdlrm
cfreactor.py175010644editdlrm
default.py19420644editdlrm
defer.py711930644editdlrm
endpoints.py772070644editdlrm
epollreactor.py84930644editdlrm
error.py126450644editdlrm
fdesc.py32230644editdlrm
gireactor.py61230644editdlrm
glib2reactor.py11150644editdlrm
gtk2reactor.py36140644editdlrm
gtk3reactor.py22520644editdlrm
inotify.py146910644editdlrm
interfaces.py965150644editdlrm
kqreactor.py102920644editdlrm
main.py10540644editdlrm
pollreactor.py60260644editdlrm
posixbase.py263570644editdlrm
process.py388960644editdlrm
protocol.py271340644editdlrm
pyuisupport.py8170644editdlrm
reactor.py18630644editdlrm
selectreactor.py62150644editdlrm
serialport.py23170644editdlrm
ssl.py84440644editdlrm
stdio.py10450644editdlrm
task.py311190644editdlrm
tcp.py549080644editdlrm
threads.py39530644editdlrm
tksupport.py20450644editdlrm
udp.py185690644editdlrm
unix.py219650644editdlrm
utils.py78760644editdlrm
win32eventreactor.py151930644editdlrm
wxreactor.py52630644editdlrm
wxsupport.py13630644editdlrm
_baseprocess.py19130644editdlrm
_dumbwin32proc.py131070644editdlrm
_glibbase.py128130644editdlrm
_idna.py13970644editdlrm
_newtls.py93320644editdlrm
_pollingfile.py89820644editdlrm
_posixserialport.py19950644editdlrm
_posixstdio.py46870644editdlrm
_producer_helpers.py37880644editdlrm
_resolver.py85300644editdlrm
_signals.py27180644editdlrm
_sslverify.py717700644editdlrm
_threadedselect.py117640644editdlrm
_win32serialport.py47440644editdlrm
_win32stdio.py32040644editdlrm
__init__.py5210644editdlrm
Edit: /usr/lib/python3/dist-packages/twisted/internet/tksupport.py (2045B)
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ This module integrates Tkinter with twisted.internet's mainloop. Maintainer: Itamar Shtull-Trauring To use, do:: | tksupport.install(rootWidget) and then run your reactor as usual - do *not* call Tk's mainloop(), use Twisted's regular mechanism for running the event loop. Likewise, to stop your program you will need to stop Twisted's event loop. For example, if you want closing your root widget to stop Twisted:: | root.protocol('WM_DELETE_WINDOW', reactor.stop) When using Aqua Tcl/Tk on macOS the standard Quit menu item in your application might become unresponsive without the additional fix:: | root.createcommand("::tk::mac::Quit", reactor.stop) @see: U{Tcl/TkAqua FAQ for more info} """ from twisted.internet import task from twisted.python.compat import _PY3 if _PY3: import tkinter.simpledialog as tkSimpleDialog import tkinter.messagebox as tkMessageBox else: import tkSimpleDialog, tkMessageBox _task = None def install(widget, ms=10, reactor=None): """Install a Tkinter.Tk() object into the reactor.""" installTkFunctions() global _task _task = task.LoopingCall(widget.update) _task.start(ms / 1000.0, False) def uninstall(): """Remove the root Tk widget from the reactor. Call this before destroy()ing the root widget. """ global _task _task.stop() _task = None def installTkFunctions(): import twisted.python.util twisted.python.util.getPassword = getPassword def getPassword(prompt = '', confirm = 0): while 1: try1 = tkSimpleDialog.askstring('Password Dialog', prompt, show='*') if not confirm: return try1 try2 = tkSimpleDialog.askstring('Password Dialog', 'Confirm Password', show='*') if try1 == try2: return try1 else: tkMessageBox.showerror('Password Mismatch', 'Passwords did not match, starting over') __all__ = ["install", "uninstall"]