Skip to main content

Twisted Qt Integration

Project description

Qt5Reactor

Using the QtReactor

Install using pip

pip install qt5reactor

Before running / importing any other Twisted code, invoke:

app = QApplication(sys.argv) # your code to init QtCore
from twisted.application import reactors
reactors.installReactor('qt5')

or

app = QApplication(sys.argv) # your code to init QtCore
import qt5reactor
qt5reactor.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.

Install the reactor before calling unittest.main().

import qt5reactor
qt5reactor.install()
unittest.main(...)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qt5reactor-0.5.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qt5reactor-0.5-py2.py3-none-any.whl (7.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file qt5reactor-0.5.tar.gz.

File metadata

  • Download URL: qt5reactor-0.5.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for qt5reactor-0.5.tar.gz
Algorithm Hash digest
SHA256 58d71f17188c896596e5f23f0eb884c966208a4db935e506d931797cbd1c0cbe
MD5 a32e391b1ef8f65084459cc33de3a711
BLAKE2b-256 7d664b75feb7d906102d1fd63467c7e2182b81b2e10e8d823c05309ad21bd260

See more details on using hashes here.

File details

Details for the file qt5reactor-0.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for qt5reactor-0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 290e156eed169a3b1d85ee02b26aac185a3ec4f46dd827472a94c753cb864aeb
MD5 cecc4d08c203beed25841894895b4e19
BLAKE2b-256 f40ea4248c0e3c712db8ffb1efde76b0b609012af0b74803e901a7e2847d88bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page