QReactor
Forked from qt5reactor which was forked from qt4reactor and now uses
[qtpy](https://github.com/spyder-ide/qtpy) to provide to support both.
Using the QtReactor
-------------------
Install using pip
::
pip install qt-reactor
Before running / importing any other Twisted code, invoke:
::
app = QApplication(sys.argv) # your code to init QtCore
from twisted.application import reactors
reactors.installReactor('qt')
or
::
app = QApplication(sys.argv) # your code to init QtCore
import qreactor
qreactor.install()
Testing
~~~~~~~
::
trial --reactor=qt5 [twisted] [twisted.test] [twisted.test.test_internet]
Make sure the plugin directory is in path or in the current directory for
reactor discovery to work.
Testing on Python 3
~~~~~~~~~~~~~~~~~~~
``trial`` does not work on Python3 yet. Use Twisted's `Python 3 test runner`_ instead.
.. _Python 3 test runner: https://twistedmatrix.com/trac/browser/trunk/admin/run-python3-tests
Install the reactor before calling ``unittest.main()``.
::
import qreactor
qreactor.install()
unittest.main(...)
Raw data
{
"_id": null,
"home_page": "https://github.com/frmdstryr/qt-reactor",
"name": "qt-reactor",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "Qt, twisted, qtpy",
"author": "Christopher R. Wood",
"author_email": "chris@leastauthority.com",
"download_url": null,
"platform": null,
"description": "QReactor\n\nForked from qt5reactor which was forked from qt4reactor and now uses \n[qtpy](https://github.com/spyder-ide/qtpy) to provide to support both.\n\nUsing the QtReactor\n-------------------\n\nInstall using pip\n\n::\n\n pip install qt-reactor\n\nBefore running / importing any other Twisted code, invoke:\n\n::\n\n app = QApplication(sys.argv) # your code to init QtCore\n from twisted.application import reactors\n reactors.installReactor('qt')\n\nor\n\n::\n\n app = QApplication(sys.argv) # your code to init QtCore\n import qreactor\n qreactor.install()\n\nTesting\n~~~~~~~\n\n::\n\n trial --reactor=qt5 [twisted] [twisted.test] [twisted.test.test_internet]\n\nMake sure the plugin directory is in path or in the current directory for\nreactor discovery to work.\n\nTesting on Python 3\n~~~~~~~~~~~~~~~~~~~\n\n``trial`` does not work on Python3 yet. Use Twisted's `Python 3 test runner`_ instead.\n\n.. _Python 3 test runner: https://twistedmatrix.com/trac/browser/trunk/admin/run-python3-tests\n\nInstall the reactor before calling ``unittest.main()``.\n\n::\n\n import qreactor\n qreactor.install()\n unittest.main(...)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Twisted Qt integration for Qt4, Qt5, and Qt6 using qtpy",
"version": "0.6.1",
"project_urls": {
"Homepage": "https://github.com/frmdstryr/qt-reactor"
},
"split_keywords": [
"qt",
" twisted",
" qtpy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2c225e05e8c2316a46138cabe3af7788ae6ce256228b5659908697025d3bfdf3",
"md5": "ff4ea40751a4676819b1b300aefce769",
"sha256": "6aa809427f30ae84d51e0b917a805312196417f09cadf951d82d297919b2577e"
},
"downloads": -1,
"filename": "qt_reactor-0.6.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff4ea40751a4676819b1b300aefce769",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 7484,
"upload_time": "2025-01-09T17:39:24",
"upload_time_iso_8601": "2025-01-09T17:39:24.135323Z",
"url": "https://files.pythonhosted.org/packages/2c/22/5e05e8c2316a46138cabe3af7788ae6ce256228b5659908697025d3bfdf3/qt_reactor-0.6.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-09 17:39:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "frmdstryr",
"github_project": "qt-reactor",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "qt-reactor"
}