Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/internet/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/internet/tksupport.pyc


}Mc@sdZddlZddlZddlZddlmZddlmZda	dddZ
dZdZd	d
dZ
dd
gZdS(s
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 Mac OS X 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<http://wiki.tcl.tk/12987>}
iN(tlog(ttaski
cCs1ttj|jatj|dtdS(s/Install a Tkinter.Tk() object into the reactor.g@@N(tinstallTkFunctionsRtLoopingCalltupdatet_tasktstarttFalse(twidgettmstreactor((s>/usr/lib/python2.7/dist-packages/twisted/internet/tksupport.pytinstall*scCstjdadS(sdRemove the root Tk widget from the reactor.

    Call this before destroy()ing the root widget.
    N(RtstoptNone(((s>/usr/lib/python2.7/dist-packages/twisted/internet/tksupport.pyt	uninstall1s
cCsddl}t|jj_dS(Ni(ttwisted.python.utiltgetPasswordtpythontutil(ttwisted((s>/usr/lib/python2.7/dist-packages/twisted/internet/tksupport.pyR;sticCsdx]tjd|dd}|s%|Stjdddd}||krM|StjddqdS(NsPassword Dialogtshowt*sConfirm PasswordsPassword Mismatchs&Passwords did not match, starting over(ttkSimpleDialogt	askstringttkMessageBoxt	showerror(tprompttconfirmttry1ttry2((s>/usr/lib/python2.7/dist-packages/twisted/internet/tksupport.pyR@sRR(t__doc__tTkinterRRttwisted.pythonRttwisted.internetRR
RRRRRt__all__(((s>/usr/lib/python2.7/dist-packages/twisted/internet/tksupport.pyt<module>s$