%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/twisted/application/twist/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/twisted/application/twist/__pycache__/_twist.cpython-312.pyc

�

Ϫ�f�
���dZddlZddlmZddlmZddlmZmZddl	m
Z
mZddlm
Z
mZdd	lmZdd
lmZmZmZddlmZGd
�d�Zy)z
Run a Twisted application.
�N)�Sequence)�_exitWithSignal)�IReactorCore�_ISupportsExitSignalCapturing)�Options�
UsageError�)�
ExitStatus�exit)�Runner)�Application�IService�
IServiceMaker�)�TwistOptionsc��eZdZdZedeedefd��Zede	de
defd��Zede
d	edd
fd��Zededd
fd
��Zeej$fdeedd
fd��Zy
)�Twistz$
    Run a Twisted application.
    �argv�returnc��t�}	|j|dd�|S#t$r+}ttj
d|�d|���Yd}~|Sd}~wwxYw)z�
        Parse command line options.

        @param argv: Command line arguments.
        @return: The parsed options.
        rNzError: z

)r�parseOptionsrrr
�EX_USAGE)r�options�es   �B/usr/lib/python3/dist-packages/twisted/application/twist/_twist.pyrz
Twist.optionsse���.��	B�� � ��a�b��*�����	B���$�$���s�$�w�i�&@�A�A����	B�s�"�	A� A�A�pluginrc��|j|�}t|j�}|j|�t	|�S)a

        Create the application service.

        @param plugin: The name of the plugin that implements the service
            application to run.
        @param options: Options to pass to the application.
        @return: The created application service.
        )�makeServicer
�tapname�setServiceParentr)rr�service�applications    rr!z
Twist.service+s;���$�$�W�-��!�&�.�.�1��� � ��-���$�$��reactorr!Nc�^�|j�|jdd|j�y)z�
        Start the application service.

        @param reactor: The reactor to run the service with.
        @param service: The application service to run.
        �before�shutdownN)�startService�addSystemEventTrigger�stopService)r$r!s  rr(zTwist.startService;s*��	����	�%�%�h�
�G�<O�<O�Pr#�twistOptionsc���t|d|d|d|d��}|j�|d}tj|�r#|j�t|j�yyy)z�
        Run the application service.

        @param twistOptions: Command line options to convert to runner
            arguments.
        r$�logLevel�logFile�fileLogObserverFactory)r$�defaultLogLevelr.r/N)r�runr�
providedBy�_exitSignalr)r+�runnerr$s   rr1z	Twist.runHsv��� ��+�(��4� ��+�#/�0H�#I�	
��	�
�
���y�)��(�3�3�G�<��"�"�.��� 3� 3�4�/�=r#c���|j|�}|d}|j}|�J�|j|j||j��}|j||�|j
|�y)z�
        Executable entry point for L{Twist}.
        Processes options and run a twisted reactor with a service.

        @param argv: Command line arguments.
        @type argv: L{list}
        r$N)rr)r�
subCommandr!�plugins�
subOptionsr(r1)�clsrrr$r6r!s      r�mainz
Twist.main\s{���+�+�d�#���)�$���'�'�
��%�%�%��+�+��?�?�:�.��&�&��
��
	����'�*�����r#)�__name__�
__module__�__qualname__�__doc__�staticmethodr�strrrrrrr!rr(r1�classmethod�sysrr:�r#rrrs������h�s�m������ �
%�
�
%��
%�H�
%��
%��
Q�l�
Q�X�
Q�$�
Q��
Q��5�,�5�4�5��5�&�(+������
��T���r#r)r>rB�typingr�twisted.application.appr�twisted.internet.interfacesrr�twisted.python.usagerr�runner._exitr
r�runner._runnerrr!r
rr�_optionsrrrCr#r�<module>rKs6��
���3�S�4�+�#�:�:�"�]�]r#

Zerion Mini Shell 1.0