/usr/lib/python3/dist-packages/twisted/application/__pycache__
Edit: /usr/lib/python3/dist-packages/twisted/application/__pycache__/reactors.cpython-310.pyc (2827B)
o
¯b! ã @ s° d Z ddlmZmZ ddlmZmZmZ ddlm Z ddl
mZmZ ddl
mZ G dd„ deƒZG d d
„ d
eƒZeeeƒG dd„ dƒƒZd
ee fdd„Zded
e fdd„ZdS )zT
Plugin-based system for enumerating available reactors and installing one of
them.
é )ÚIterableÚcast)Ú AttributeÚ InterfaceÚimplementer)ÚIReactorCore)ÚIPluginÚ
getPlugins)ÚnamedAnyc @ s* e Zd ZdZedƒZedƒZddd„ZdS ) ÚIReactorInstallerzB
Definition of a reactor which can probably be installed.
zE
A brief string giving the user-facing name of this reactor.
zK
A longer string giving a user-facing description of this reactor.
ÚreturnNc C s dS )z'
Install this reactor.
N© r
r
r
ú>/usr/lib/python3/dist-packages/twisted/application/reactors.pyÚinstall# s zIReactorInstaller.install©r N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r Ú shortNameÚdescriptionr r
r
r
r r s ÿÿr c @ s e Zd ZdZdS )Ú
NoSuchReactorzT
Raised when an attempt is made to install a reactor which cannot be found.
N)r r r r r
r
r
r r , s r c @ s0 e Zd ZdZdededefdd„Zdd d
„ZdS )ÚReactorz|
@ivar moduleName: The fully-qualified Python name of the module of which
the install callable is an attribute.
r Ú
moduleNamer c C s || _ || _|| _d S ©N)r r r )Úselfr r r r
r
r Ú__init__9 s
zReactor.__init__r Nc C s t | jƒ ¡ d S r )r
r r )r r
r
r r > s zReactor.installr )r r r r Ústrr r r
r
r
r r 2 s r r c C s t tƒS )z=
Return an iterator of L{IReactorInstaller} plugins.
)r r r
r
r
r ÚgetReactorTypesB s r r c C s@ t ƒ D ]}|j| kr| ¡ ddlm} tt|ƒ S qt| ƒ‚)zé
Install the reactor with the given C{shortName} attribute.
@raise NoSuchReactor: If no reactor is found with a matching C{shortName}.
@raise Exception: Anything that the specified reactor can raise when installed.
r )Úreactor)r r r Útwisted.internetr r r r )r Ú installerr r
r
r ÚinstallReactorI s
ür" N)r Útypingr r Úzope.interfacer r r Útwisted.internet.interfacesr Útwisted.pluginr r Útwisted.python.reflectr
r ÚKeyErrorr r r r r" r
r
r
r Ú
s