/usr/lib/python2.7/dist-packages/crochet/__init__.py is in python-crochet 1.4.0-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | """
Crochet: Use Twisted Anywhere!
"""
from __future__ import absolute_import
import sys
from twisted.python.log import startLoggingWithObserver
from twisted.python.runtime import platform
if platform.type == "posix":
try:
from twisted.internet.process import reapAllProcesses
except (SyntaxError, ImportError):
if sys.version_info < (3, 3, 0):
raise
else:
# Process support is still not ported to Python 3 on some versions
# of Twisted.
reapAllProcesses = lambda: None
else:
# waitpid() is only necessary on POSIX:
reapAllProcesses = lambda: None
from ._shutdown import _watchdog, register
from ._eventloop import (EventualResult, TimeoutError, EventLoop, _store,
ReactorStopped)
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
def _importReactor():
from twisted.internet import reactor
return reactor
_main = EventLoop(_importReactor, register, startLoggingWithObserver,
_watchdog, reapAllProcesses)
setup = _main.setup
no_setup = _main.no_setup
run_in_reactor = _main.run_in_reactor
wait_for = _main.wait_for
retrieve_result = _store.retrieve
# Backwards compatibility with 0.5.0:
in_reactor = _main.in_reactor
DeferredResult = EventualResult
# Backwards compatibility with 1.1.0 and earlier:
wait_for_reactor = _main.wait_for_reactor
__all__ = ["setup", "run_in_reactor", "EventualResult", "TimeoutError",
"retrieve_result", "no_setup", "wait_for",
"ReactorStopped", "__version__",
# Backwards compatibility:
"DeferredResult", "in_reactor", "wait_for_reactor",
]
|