K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / lib / python2.7 / dist-packages / twisted / internet /
server ip : 104.21.89.46

your ip : 172.70.131.120

H O M E


Filename/usr/lib/python2.7/dist-packages/twisted/internet/wxsupport.py
Size1.41 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:56
Last modified14-Feb-2011 11:45
Last accessed07-Jul-2025 04:29
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

#
"""Old method of wxPython support for Twisted.

twisted.internet.wxreactor is probably a better choice.

To use::

| # given a wxApp instance called myWxAppInstance:
| from twisted.internet import wxsupport
| wxsupport.install(myWxAppInstance)

Use Twisted's APIs for running and stopping the event loop, don't use
wxPython's methods.

On Windows the Twisted event loop might block when dialogs are open
or menus are selected.

Maintainer: Itamar Shtull-Trauring
"""

import warnings
warnings.warn("wxsupport is not fully functional on Windows, wxreactor is better.")

# wxPython imports
from wxPython.wx import wxApp

# twisted imports
from twisted.internet import reactor
from twisted.python.runtime import platformType


class wxRunner:
"""Make sure GUI events are handled."""

def __init__(self, app):
self.app = app

def run(self):
"""
Execute pending WX events followed by WX idle events and
reschedule.
"""
# run wx events
while self.app.Pending():
self.app.Dispatch()

# run wx idle events
self.app.ProcessIdle()
reactor.callLater(0.02, self.run)


def install(app):
"""Install the wxPython support, given a wxApp instance"""
runner = wxRunner(app)
reactor.callLater(0.02, runner.run)


__all__ = ["install"]