-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright (c) 2001-2011 Twisted Matrix Laboratories. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
# See LICENSE for details. | ||
""" | ||
See main docstring in module __init__.py | ||
Reactor supporting PyQt4 | ||
API Stability: stable | ||
Maintainer: U{Glenn H Tarbox, PhD<mailto:glenn@tarbox.org>} | ||
""" | ||
|
||
from __future__ import print_function | ||
|
||
from twisted.python import runtime | ||
|
||
from qtreactor import qtreactor_config | ||
|
||
qtreactor_config.set_qt_name("PyQt4") | ||
|
||
from qtreactor import qt4base | ||
|
||
class pyqt4reactor(qt4base.QtReactor): | ||
pass | ||
|
||
class pyqt4eventreactor(qt4base.QtReactor): | ||
pass | ||
|
||
def posixinstall(): | ||
""" | ||
Install the Qt reactor. | ||
""" | ||
p = pyqt4reactor() | ||
from twisted.internet.main import installReactor | ||
|
||
installReactor(p) | ||
|
||
|
||
def win32install(): | ||
""" | ||
Install the Qt reactor. | ||
""" | ||
p = pyqt4eventreactor() | ||
from twisted.internet.main import installReactor | ||
|
||
installReactor(p) | ||
|
||
if runtime.platform.getType() == 'win32': | ||
install = win32install | ||
else: | ||
install = posixinstall | ||
|
||
__all__ = ["install"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file should be added back to py_modules in setup.py.
Also, maybe its contents could be simply