File: hook-twisted.py

package info (click to toggle)
python-autobahn 24.4.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 8,420 kB
  • sloc: python: 38,601; javascript: 2,705; makefile: 897; ansic: 373; sh: 64
file content (11 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
# https://github.com/pyinstaller/pyinstaller/issues/3390

import sys

# this creates module: sys.modules['twisted.internet.reactor']
if sys.platform in ['win32']:
    from twisted.internet.iocpreactor import reactor as _iocpreactor
    _iocpreactor.install()
else:
    from twisted.internet import default
    default.install()