HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/twisted/scripts/__pycache__/_twistw.cpython-310.pyc
o

�b�@sdddlZddlZddlmZddlmZmZmZddlm	Z	Gdd�dej
�Z
Gdd�dej�ZdS)	�N)�	copyright)�app�internet�service)�logc@s"eZdZdZgd�gZdd�ZdS)�
ServerOptionszUsage: twistd [options])�nodaemon�nz(for backwards compatibility).cCs2tdtj��|jd�ttj|jd�t��dS)z5
        Print version information and exit.
        z$twistd (the Twisted Windows runner) )�fileN)�printr�version�stdout�sys�exit��self�r�9/usr/lib/python3/dist-packages/twisted/scripts/_twistw.py�opt_versions
�zServerOptions.opt_versionN)�__name__�
__module__�__qualname__�synopsis�optFlagsrrrrrrs
�rc@s eZdZdZdd�Zdd�ZdS)�WindowsApplicationRunnerzn
    An ApplicationRunner which avoids unix-specific things. No
    forking, no PID files, no privileges.
    cCs$tj|_tj|_t�|jd�dS)z4
        Do pre-application-creation setup.
        �rundirN)rr
�	oldstdout�stderr�	oldstderr�os�chdir�configrrrr�preApplication'sz'WindowsApplicationRunner.preApplicationcCs^t�|j���t�|j|jd�t�t�ddd��d�|�	d|j
|j�t�
d�dS)z<
        Start the application and run the reactor.
        �no_saveg�������?cSsdS)Nrrrrr�<lambda>5sz:WindowsApplicationRunner.postApplication.<locals>.<lambda>rNzServer Shut Down.)r�IService�application�privilegedStartServicer�startApplicationr!r�TimerService�startReactorrrr�msgrrrr�postApplication/s
z(WindowsApplicationRunner.postApplicationN)rrr�__doc__r"r,rrrrr!sr)
rr�twistedr�twisted.applicationrrr�twisted.pythonrr�ApplicationRunnerrrrrr�<module>s