/usr/lib/python3/dist-packages/twisted/internet
NameSizeModeActions
iocpreactor/-0755rm
test/-0755rm
__pycache__/-0755rm
abstract.py192950644editdlrm
address.py52440644editdlrm
asyncioreactor.py111310644editdlrm
base.py473920644editdlrm
cfreactor.py174990644editdlrm
default.py18930644editdlrm
defer.py856540644editdlrm
endpoints.py774400644editdlrm
epollreactor.py89410644editdlrm
error.py134820644editdlrm
fdesc.py32370644editdlrm
gireactor.py46200644editdlrm
glib2reactor.py11150644editdlrm
gtk2reactor.py36400644editdlrm
gtk3reactor.py15270644editdlrm
inotify.py143960644editdlrm
interfaces.py980480644editdlrm
kqreactor.py108180644editdlrm
main.py10060644editdlrm
pollreactor.py59740644editdlrm
posixbase.py276040644editdlrm
process.py385160644editdlrm
protocol.py273910644editdlrm
pyuisupport.py8430644editdlrm
reactor.py18160644editdlrm
selectreactor.py61020644editdlrm
serialport.py22720644editdlrm
ssl.py86430644editdlrm
stdio.py10000644editdlrm
task.py336080644editdlrm
tcp.py549800644editdlrm
testing.py292320644editdlrm
threads.py38120644editdlrm
tksupport.py19710644editdlrm
udp.py186190644editdlrm
unix.py225080644editdlrm
utils.py86820644editdlrm
win32eventreactor.py152660644editdlrm
wxreactor.py53150644editdlrm
wxsupport.py13050644editdlrm
_baseprocess.py20030644editdlrm
_dumbwin32proc.py127760644editdlrm
_glibbase.py127060644editdlrm
_idna.py14220644editdlrm
_newtls.py91570644editdlrm
_pollingfile.py87910644editdlrm
_posixserialport.py20810644editdlrm
_posixstdio.py49960644editdlrm
_producer_helpers.py39090644editdlrm
_resolver.py84650644editdlrm
_signals.py26700644editdlrm
_sslverify.py727960644editdlrm
_threadedselect.py115820644editdlrm
_win32serialport.py49140644editdlrm
_win32stdio.py31400644editdlrm
__init__.py5210644editdlrm
Edit: /usr/lib/python3/dist-packages/twisted/internet/tksupport.py (1971B)
# 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} """ import tkinter.messagebox as tkMessageBox import tkinter.simpledialog as tkSimpleDialog from twisted.internet import task _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"]