+
    üÐjpZ  ã                   óÒ  € ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
HtHt ^ RIHtHt ^ RIHtHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHtHtHtHtHtHt ^ R
I H!t!H"t"H#t#  ! R R4      t$ ! R R]$4      t% ! R R]$4      t& ! R R4      t' ! R R4      t(R t)R%R lt*R t+R t, ! R R4      t-R t.R t/ ! R R4      t0 ! R R ]Pb                  ]04      t2R! t3R" t4R# t5R$ t6R# )&é    N)Ú
attrgetter)Ú	copyrightÚloggerÚplugin)ÚreactorsÚservice)ÚNoSuchReactorÚinstallReactor)Údefer)Ú_ISupportsExitSignalCapturing)Úsob)ÚfailureÚlogÚlogfileÚruntimeÚusageÚutil)ÚnamedAnyÚnamedModuleÚqualc                   ó0   a € ] tR t^t o RtR tR tRtV tR# )Ú_BasicProfilerzÝ
@ivar saveStats: if C{True}, save the stats information instead of the
    human readable format
@type saveStats: C{bool}

@ivar profileOutput: the name of the file use to print profile data.
@type profileOutput: C{str}
c                ó   € Wn         W n        R # ©N©ÚprofileOutputÚ	saveStats)Úselfr   r   s   &&&Ú9/usr/lib/python3/dist-packages/twisted/application/app.pyÚ__init__Ú_BasicProfiler.__init__%   s   € Ø*ÔØ"Žó    c                ó:   € RV RV 2pVR,          p\        V4      h)z¯
Helper method to report an import error with a profile module. This
has to be explicit because some of these modules are removed by
distributions due to them being non-free.
zFailed to import module ú: zê
This is most likely caused by your operating system not including
the module due to it being non-free. Either do not use the option
--profile, or install the module; your operating system vendor
may provide it in a separate package.
)Ú
SystemExit)r   ÚmoduleÚeÚss   &&& r   Ú_reportImportErrorÚ!_BasicProfiler._reportImportError)   s1   € ð ' v h¨b°°Ð4ˆØ	ð õ 	ˆô ˜‹mÐr"   r   N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r    r)   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s   ø‡ € ñò#÷ð r"   r   c                   ó*   a € ] tR t^9t o RtR tRtV tR# )ÚProfileRunnerz)
Runner for the standard profile module.
c                óT  €  ^ RI pXP                  4       pVP	                  VP
                  4       V P                  '       d   VP                  V P                  4       R# \        P                  \        V P                  R4      up\        n
         VP                  4        V\        P                  u\        n
        pVP                  4        R#   \         d   pT P                  RT4        Rp?LëRp?ii ; i  T\        P                  u\        n
        pTP                  4        i ; i)z*
Run reactor under the standard profiler.
NÚprofileÚa)r7   ÚImportErrorr)   ÚProfileÚruncallÚrunr   Ú
dump_statsr   ÚsysÚstdoutÚopenÚprint_statsÚclose)r   Úreactorr7   r'   ÚpÚtmps   &&    r   r<   ÚProfileRunner.run>   sË   € ð	2Ûð �O‰OÓˆØ	�	‰	�'—+‘+ÔØ�>�>ˆ>Ø�L‰L˜×+Ñ+Ö,ä!Ÿj™j¬$¨t×/AÑ/AÀ3Ó*GˆOˆC””ðØ—‘”à"%¤s§z¡z�””
˜CØ—	‘	–øô ô 	2Ø×#Ñ# I¨q×1Ñ1ûð	2ûð #&¤s§z¡z�””
˜CØ—	‘	•ús#   ‚C ÂC9 ÃC6ÃC1Ã1C6Ã9.D'© N©r+   r,   r-   r.   r/   r<   r0   r1   r2   s   @r   r5   r5   9   s   ø‡ € ñ÷ð r"   r5   c                   ó*   a € ] tR t^Tt o RtR tRtV tR# )ÚCProfileRunnerz!
Runner for the cProfile module.
c                ó  €  ^ RI p^ RIpXP	                  4       pVP                  VP                  4       V P                  '       d   VP                  V P                  4       R# \        V P                  R4      ;_uu_ 4       pXP                  WVR7      pVP                  4        VP                  R4       VP                  4        RRR4       R#   \         d   pT P                  RT4        Rp?LèRp?ii ; i  + '       g   i     R# ; i)z*
Run reactor under the cProfile profiler.
NÚcProfileÚw)Ústreaméÿÿÿÿ)rL   Úpstatsr9   r)   r:   r;   r<   r   r=   r   r@   ÚStatsÚ
strip_dirsÚ
sort_statsrA   )r   rC   rL   rP   r'   rD   rN   r(   s   &&      r   r<   ÚCProfileRunner.runY   sÄ   € ð	3ÛÛð ×ÑÓˆØ	�	‰	�'—+‘+ÔØ�>�>ˆ>Ø�L‰L˜×+Ñ+Ö,ä�d×(Ñ(¨#×.Ô.°&Ø—L‘L �LÓ2�Ø—‘”Ø—‘˜RÔ Ø—‘”÷	 /Ñ.øô ô 	3Ø×#Ñ# J°×2Ñ2ûð	3ú÷ /×.Ð.ús$   ‚C ÂAC:ÃC7ÃC2Ã2C7Ã:D	rG   NrH   r2   s   @r   rJ   rJ   T   s   ø‡ € ñ÷ ð  r"   rJ   c                   ó6   a € ] tR t^ot o RtR]R]/tR tRt	V t
R# )ÚAppProfilerzš
Class which selects a specific profile runner based on configuration
options.

@ivar profiler: the name of the selected profiler.
@type profiler: C{str}
r7   Úcprofilec                óf  € VP                  R R4      pVP                  RR4      pVP                  RR4      P                  4       V n        V P                  V P                  9   d7   V P                  V P                  ,          ! W24      pVP                  V n        R# \        RV P                   24      h)Ú	savestatsFr7   NÚprofilerrW   zUnsupported profiler name: )ÚgetÚlowerrZ   Ú	profilersr<   r%   )r   Úoptionsr   r   rZ   s   &&   r   r    ÚAppProfiler.__init__z   s†   € Ø—K‘K ¨UÓ3ˆ	ØŸ™ I¨tÓ4ˆØŸ™ J°
Ó;×AÑAÓCˆŒØ�=‰=˜DŸN™NÔ*Ø—~‘~ d§m¡mÖ4°]ÓNˆHØ—|‘|ˆDŽHäÐ:¸4¿=¹=¸/ÐJÓKÐKr"   )rZ   r<   N)r+   r,   r-   r.   r/   r5   rJ   r]   r    r0   r1   r2   s   @r   rV   rV   o   s&   ø‡ € ñð ˜M¨:°~ÐF€I÷Lð Lr"   rV   c                   óF   a € ] tR t^…t o RtRtR tR tR tR t	R t
RtV tR# )	Ú	AppLoggera-  
An L{AppLogger} attaches the configured log observer specified on the
commandline to a L{ServerOptions} object, a custom L{logger.ILogObserver},
or a legacy custom {log.ILogObserver}.

@ivar _logfilename: The name of the file to which to log, if other than the
    default.
@type _logfilename: C{str}

@ivar _observerFactory: Callable object that will create a log observer, or
    None.

@ivar _observer: log observer added at C{start} and removed at C{stop}.
@type _observer: a callable that implements L{logger.ILogObserver} or
    L{log.ILogObserver}.
Nc                ót   € VP                  RR4      V n        VP                  R4      ;'       g    RV n        R# )z5
Initialize an L{AppLogger} with a L{ServerOptions}.
r   Ú r   N)r[   Ú_logfilenameÚ_observerFactory©r   r^   s   &&r   r    ÚAppLogger.__init__™   s0   € ð $ŸK™K¨	°2Ó6ˆÔØ '§¡¨HÓ 5× =Ð =¸ˆÖr"   c                óö  € V P                   e   V P                  4       pMDVP                  \        P                  R4      pVf!   VP                  \        P                  R4      pVf   V P                  4       pW n        \        P                  P                  V P                  4      '       d   V P                  .pM�\        P                  P                  V P                  4      '       d#   \        P                  ! V P                  4      .pM>\        P                  ! R\        ^R7       \        P                  ! V P                  4      .p\        P                  P                  V4       V P                  4        R# )aK  
Initialize the global logging system for the given application.

If a custom logger was specified on the command line it will be used.
If not, and an L{logger.ILogObserver} or legacy L{log.ILogObserver}
component has been set on C{application}, then it will be used as the
log observer. Otherwise a log observer will be created based on the
command line options for built-in loggers (e.g. C{--logfile}).

@param application: The application on which to check for an
    L{logger.ILogObserver} or legacy L{log.ILogObserver}.
@type application: L{twisted.python.components.Componentized}
NaZ  Passing a logger factory which makes log observers which do not implement twisted.logger.ILogObserver or twisted.python.log.ILogObserver to twisted.application.app.AppLogger was deprecated in Twisted 16.2. Please use a factory that produces twisted.logger.ILogObserver (or the legacy twisted.python.log.ILogObserver) implementing objects instead.)Ú
stacklevel)re   ÚgetComponentr   ÚILogObserverr   Ú_getLogObserverÚ	_observerÚ
providedByÚLegacyLogObserverWrapperÚwarningsÚwarnÚDeprecationWarningÚglobalLogBeginnerÚbeginLoggingToÚ_initialLog)r   ÚapplicationÚobserverÚ	observerss   &&  r   ÚstartÚAppLogger.start    s  € ð × Ñ Ò,Ø×,Ñ,Ó.‰Hà"×/Ñ/´×0CÑ0CÀTÓJˆHØÒà&×3Ñ3´C×4DÑ4DÀdÓK�àÒØ×+Ñ+Ó-ˆHØ!Œä×Ñ×)Ñ)¨$¯.©.×9Ò9ØŸ™Ð(‰IÜ×Ñ×(Ñ(¨¯©×8Ò8Ü×8Ò8¸¿¹ÓHÐI‰Iä�MŠMðô #Øõô  ×8Ò8¸¿¹ÓHÐIˆIä× Ñ ×/Ñ/°	Ô:Ø×ÑÖr"   c                ó6  € ^ RI Hp \        P                  ! V 4      P	                  R\
        P                  \        P                  \        P                  ! 4       R7       \        P                  ! V 4      P	                  R\        VP                  4      R7       R# )z!
Print twistd start log message.
©rC   z1twistd {version} ({exe} {pyVersion}) starting up.)ÚversionÚexeÚ	pyVersionzreactor class: {reactor}.N)Útwisted.internetrC   r   Ú
_loggerForÚinfor   r}   r>   Ú
executabler   ÚshortPythonVersionr   Ú	__class__)r   rC   s   & r   ru   ÚAppLogger._initialLogÒ   st   € õ 	-ä×Ò˜$Ó×$Ñ$Ø?Ü×%Ñ%Ü—‘Ü×0Ò0Ó2ð	 	%ô 	
ô 	×Ò˜$Ó×$Ñ$Ø'´°g×6GÑ6GÓ1Hð 	%ö 	
r"   c                óè   € V P                   R8X  g   V P                   '       g   \        P                  pM)\        P                  P                  V P                   4      p\        P                  ! V4      # )zZ
Create a log observer to be added to the logging system before running
this application.
Ú-)rd   r>   r?   r   ÚLogFileÚfromFullPathr   ÚtextFileLogObserver)r   ÚlogFiles   & r   rl   ÚAppLogger._getLogObserverâ   sQ   € ð
 ×Ñ Ô#¨4×+<×+<Ð+<Ü—j‘j‰Gä—o‘o×2Ñ2°4×3DÑ3DÓEˆGÜ×)Ò)¨'Ó2Ð2r"   c                óÐ   € \         P                  ! V 4      P                  R4       V P                  e3   \         P                  P                  V P                  4       RV n        R# R# )zC
Remove all log observers previously set up by L{AppLogger.start}.
zServer Shut Down.N)r   r�   r‚   rm   ÚglobalLogPublisherÚremoveObserver©r   s   &r   ÚstopÚAppLogger.stopí   sL   € ô 	×Ò˜$Ó×$Ñ$Ð%8Ô9Ø�>‰>Ò%Ü×%Ñ%×4Ñ4°T·^±^ÔDØ!ˆDŽNñ &r"   )rd   rm   re   )r+   r,   r-   r.   r/   rm   r    ry   ru   rl   r’   r0   r1   r2   s   @r   ra   ra   …   s0   ø‡ € ñð" €Iò>ò0òd
ò 	3÷"ð "r"   ra   c                  ó–   € R  p R pR pV\         P                  n        V \         P                  n        V\         P                  n        R# )c                 óŠ   € V P                  4        V P                  4        ^ RIHp VP	                  ^ VP
                  4       ^# )r   r|   )Úclear_all_breaksÚset_continuer€   rC   Ú	callLaterr’   )r   ÚargrC   s   && r   Údo_stopÚfixPdb.<locals>.do_stopø   s4   € Ø×ÑÔØ×ÑÔÝ,à×Ñ˜!˜WŸ\™\Ô*Ùr"   c                 ó   € \        R 4       R# )zEstop - Continue execution, then cleanly shutdown the twisted reactor.N)Úprintr‘   s   &r   Ú	help_stopÚfixPdb.<locals>.help_stop   s   € ÜØVö	
r"   c                 ó2   € \         P                  ! ^ 4       R# )r   N)ÚosÚ_exitr‘   s   &r   Úset_quitÚfixPdb.<locals>.set_quit  s   € Ü
�Š�Žr"   N)ÚpdbÚPdbr£   rš   rž   )rš   rž   r£   s      r   ÚfixPdbr§   ÷   s6   € òò
ò
ð  „C‡G�GÔØ„C‡G�G„OØ!„C‡G�GÖr"   c                ó  € Vf   ^ RI Hp  V R,          '       d   Ve   VP                  V4       R# R# V R,          '       d¤   V\        n        V\        n        \        P                  R8X  dM   \        P                  ! \        P                  R 4       \        P                  ! \        P                  R 4       \        4        \        P                  ! VP                  4       R# VP                  4        R#   \         dˆ    RpT R	,          '       d   TpM\        R
R4      pRp \         P"                  ! TR7       TP%                  4        T'       d   TP'                  4         R#  R#   T'       d   TP'                  4        i i ; ii ; i)a  
Start the reactor, using profiling if specified by the configuration, and
log any error happening in the process.

@param config: configuration of the twistd application.
@type config: L{ServerOptions}

@param oldstdout: initial value of C{sys.stdout}.
@type oldstdout: C{file}

@param oldstderr: initial value of C{sys.stderr}.
@type oldstderr: C{file}

@param profiler: object used to run the reactor with profiling.
@type profiler: L{AppProfiler}

@param reactor: The reactor to use.  If L{None}, the global reactor will
    be used.
Nr|   r7   ÚdebugÚposixc                  ó,   € \         P                  ! 4       # r   ©r¥   Ú	set_trace©Úargss   *r   Ú<lambda>Ú'runReactorWithLogging.<locals>.<lambda>+  s
   € ¼C¿MºM¼Or"   c                  ó,   € \         P                  ! 4       # r   r¬   r®   s   *r   r°   r±   ,  s
   € ¼3¿=º=¼?r"   FÚnodaemonzTWISTD-CRASH.logr8   T©Úfile)r€   rC   r<   r>   r?   Ústderrr   ÚplatformTypeÚsignalÚSIGUSR2ÚSIGINTr§   r¥   r;   ÚBaseExceptionr@   Ú	tracebackÚ	print_excÚflushrB   )ÚconfigÚ	oldstdoutÚ	oldstderrrZ   rC   rB   rµ   s   &&&&&  r   ÚrunReactorWithLoggingrÂ     s  € ð( ‚Ý,ðØ�)×ÔØÒ#Ø—‘˜WÖ%ñ $à�G�_Œ_Ø"ŒCŒJØ"ŒCŒJÜ×#Ñ# wÔ.Ü—’œfŸn™nÑ.KÔLÜ—’œfŸm™mÑ-JÔKÜŒHÜ�KŠK˜Ÿ™Ö$à�K‰KŽMøÜô ØˆØ�*×ÔØ‰DäÐ*¨CÓ0ˆDØˆEð	Ü×Ò TÕ*Ø�J‰JŒLçØ—
‘
—ò ø�uØ—
‘
•ð úðús@   ŒC8 ›C8 ´C8 ÁB!C8 Ã&C8 Ã8F
ÄF
Ä&'E+ÅF
Å+FÆF
c                 óB   € V '       d   \         P                   ! R 4      # R# )zPassphrase: N)Úgetpass©Úneededs   &r   ÚgetPassphraserÇ   @  s   € ßÜ�Š˜~Ó.Ð.ár"   c                 óB   € V '       d   \         P                  ! R 4      # R# )zEncryption passphrase: N)r   ÚgetPasswordrÅ   s   &r   ÚgetSavePassphraserÊ   G  s   € ßÜ×ÒÐ 9Ó:Ð:ár"   c                   óP   a € ] tR tRt o Rt]t]tR t	R t
R tR tR tR tR	tV tR
# )ÚApplicationRunneriN  aÚ  
An object which helps running an application based on a config object.

Subclass me and implement preApplication and postApplication
methods. postApplication generally will want to run the reactor
after starting the application.

@ivar config: The config object, which provides a dict-like interface.

@ivar application: Available in postApplication, but not
   preApplication. This is the application object.

@ivar profilerFactory: Factory for creating a profiler object, able to
    profile the application if options are set accordingly.

@ivar profiler: Instance provided by C{profilerFactory}.

@ivar loggerFactory: Factory for creating object responsible for logging.

@ivar logger: Instance provided by C{loggerFactory}.
c                ój   € Wn         V P                  V4      V n        V P                  V4      V n        R # r   )r¿   ÚprofilerFactoryrZ   ÚloggerFactoryr   )r   r¿   s   &&r   r    ÚApplicationRunner.__init__h  s+   € ØŒØ×,Ñ,¨VÓ4ˆŒØ×(Ñ(¨Ó0ˆŽr"   c                óî   € V P                  4        V P                  4       V n        V P                  P	                  V P                  4       V P                  4        V P                  P                  4        R# )z
Run the application.
N)ÚpreApplicationÚcreateOrGetApplicationrv   r   ry   ÚpostApplicationr’   r‘   s   &r   r<   ÚApplicationRunner.runm  sU   € ð 	×ÑÔØ×6Ñ6Ó8ˆÔà�‰×Ñ˜$×*Ñ*Ô+à×ÑÔØ�‰×ÑÖr"   c                óÊ   € Vf   ^ RI Hp \        V P                  W#V P                  V4       \
        P                  ! V4      '       d   VP                  V n        R# RV n        R# )zŽ
Run the reactor with the given configuration.  Subclasses should
probably call this from C{postApplication}.

@see: L{runReactorWithLogging}
Nr|   )r€   rC   rÂ   r¿   rZ   r   rn   Ú_exitSignal)r   rC   rÀ   rÁ   s   &&&&r   ÚstartReactorÚApplicationRunner.startReactory  sJ   € ð Š?Ý0Ü˜dŸk™k¨9ÀÇÁÐPWÔXä(×3Ò3°G×<Ò<Ø&×2Ñ2ˆDÖà#ˆDÖr"   c                ó   € \        4       h)zk
Override in subclass.

This should set up any state necessary before loading and
running the Application.
©ÚNotImplementedErrorr‘   s   &r   rÒ   Ú ApplicationRunner.preApplication‰  s   € ô "Ó#Ð#r"   c                ó   € \        4       h)zÂ
Override in subclass.

This will be called after the application has been loaded (so
the C{application} attribute will be set). Generally this
should start the application and run the reactor.
rÛ   r‘   s   &r   rÔ   Ú!ApplicationRunner.postApplication’  s   € ô "Ó#Ð#r"   c                ó´  € V P                   P                  '       dŠ   V P                   P                  V P                   P                  ,          pVP                  V P                   P                  4      p\
        P                  ! VP                  4      pVP                  V4       V# \        V P                   R,          4      p\        V P                   V4      pV# )aM  
Create or load an Application based on the parameters found in the
given L{ServerOptions} instance.

If a subcommand was used, the L{service.IServiceMaker} that it
represents will be used to construct a service to be added to
a newly-created Application.

Otherwise, an application will be loaded based on parameters in
the config.
Ú	encrypted)r¿   Ú
subCommandÚloadedPluginsÚmakeServiceÚ
subOptionsr   ÚApplicationÚtapnameÚsetServiceParentrÇ   ÚgetApplication)r   ÚplgÚserrv   Ú
passphrases   &    r   rÓ   Ú(ApplicationRunner.createOrGetApplicationœ  s¡   € ð �;‰;×!×!Ð!ð —+‘+×+Ñ+¨D¯K©K×,BÑ,BÕCˆCØ—/‘/ $§+¡+×"8Ñ"8Ó9ˆCÜ!×-Ò-¨c¯k©kÓ:ˆKØ× Ñ  Ô-ð Ðô ' t§{¡{°;Õ'?Ó@ˆJÜ(¨¯©°jÓAˆKØÐr"   )r×   rv   r¿   r   rZ   N)r+   r,   r-   r.   r/   rV   rÎ   ra   rÏ   r    r<   rØ   rÒ   rÔ   rÓ   r0   r1   r2   s   @r   rÌ   rÌ   N  s9   ø‡ € ñð, "€OØ€Mò1ò

ò$ò $ò$÷ð r"   rÌ   c                 óö  € R Uu. uF  q V,          '       g   K  W,          V3NK  	  up^ ,          pV^ ,          RR/P                  V^,          V^,          4      rT \        P                  ! RV,          4       \        P                  ! WEV4      p\        P                  ! R4       V# u upi   \
         dÀ   pRT,          p\        T\        4      '       d"   TP                  ^ ,          R8X  d
   TR,          p\        P                  ! \        P                  R7       \        P                  ! T4       \        P                  ! 4        \        P                  ! R	T,           R	,           4        R
p?X# R
p?ii ; i)Úpythonrµ   ÚpicklezLoading %s...zLoaded.zFailed to load application: %srv   aN  
Could not find 'application' in the file. To use 'twistd -y', your .tac
file must create a suitable object (e.g., by calling service.Application())
and store it in a variable named 'application'. twistd loads your .tac file
and scans the global variables for one of this name.

Please read the 'Using Application' HOWTO for details.
r´   Ú
N)rï   Úsourcerµ   )r[   r   Úmsgr   ÚloadApplicationÚ	ExceptionÚ
isinstanceÚKeyErrorr¯   r¼   r½   r   Údeferrr>   Úexit)r¿   rì   Útr(   ÚfilenameÚstylerv   r'   s   &&      r   ré   ré   ¹  s  € Ù!=ÓKÑ!=˜AÈÇÁŒˆ&�)�Q‹Ñ!=ÑKÈAÕN€AØ˜•d˜V XÐ.×2Ñ2°1°Qµ4¸¸1½Ó>ˆeð"Ü�Š� (Õ*Ô+Ü×-Ò-¨h¸zÓJˆÜ�Š�	Ôð  Ðùò+ 	Løô ô "Ø,¨qÕ0ˆÜ�aœ×"Ò" q§v¡v¨a¥y°MÔ'AØð õ ˆAô 	×Ò¤§¡Õ-Ü�Š�Œ
Ü�
Š
ŒÜ�Š�˜•˜D•×!Ð!ØÐûð"ús$   …B)šB)ÁA
B. Â.E8Â9B4E3Å3E8c                  ó�   € \         P                  ! \        P                  ! 4        U u. uF  q P                  NK  	  up 4      # u up i r   )r   ÚCompleteListr   ÚgetReactorTypesÚ	shortName)Úrs    r   Ú_reactorActionr  Ò  s2   € Ü×Ò´H×4LÒ4LÔ4NÓOÑ4N¨qŸ{œ{Ñ4NÑOÓPÐPùÒOs   ¨Ac                   óš   a € ] tR tRt o Rt]P                  ! R]/R7      t]	P                  t]! ]P                  4      tR tR t]tRtV tR# )	ÚReactorSelectionMixiniÖ  z­
Provides options for selecting a reactor to install.

If a reactor is installed, the short name which was used to locate it is
saved as the value for the C{"reactor"} key.
rC   )Ú
optActionsc           	     ót  € \        V P                  4       \        R4      R7      pRpV FP  p \        VP                  4       V P
                  P                  RVP                  R RVP                   R24       KR  	  V'       dR   V P
                  P                  R4       V P
                  P                  R
4       V P
                  P                  V4       \        ^ 4      h  \         dL   pTRP                  TP                  TP                  TP                  ^ ,          4      ,          p R	p?EK	  R	p?ii ; i)z5
Display a list of possibly available reactor names.
r   ©Úkeyrc   z    z<4Ú	rñ   z    !{:<4}	{} ({})
Nz.    reactors not available on this platform:

)ÚsortedÚ_getReactorTypesr   r   Ú
moduleNameÚmessageOutputÚwriter   Údescriptionr9   Úformatr¯   r%   )r   ÚrctsÚnotWorkingReactorsr  r'   s   &    r   Úopt_help_reactorsÚ'ReactorSelectionMixin.opt_help_reactorsã  s  € ô �d×+Ñ+Ó-´:¸kÓ3JÔKˆØÐÛˆAðÜ˜AŸL™LÔ)Ø×"Ñ"×(Ñ(¨4°·±¸BÐ/?¸rÀ!Ç-Á-ÀÐPRÐ)SÖTñ ÷ Ø×Ñ×$Ñ$ TÔ*Ø×Ñ×$Ñ$ØEôð ×Ñ×$Ñ$Ð%7Ô8Ü˜‹mÐøô ô Ø"Ð&=×&DÑ&DØ—K‘KØ—M‘MØ—F‘F˜1•Ió'õ ×"ûðús   ­AC!Ã!D7Ã,?D2Ä2D7c                óÔ   €  \        V4       WR&   R#   \         d    RT: R2p\        P                  ! T4      h\         d#   pRT: R2p\        P                  ! T4      hRp?ii ; i)zH
Which reactor to use (see --help-reactors for a list of possibilities)
rC   z'The specified reactor does not exist: 'z:'.
See the list of available reactors with --help-reactorsz9The specified reactor cannot be used, failed with error: z9.
See the list of available reactors with --help-reactorsN)r
   r	   r   Ú
UsageErrorrõ   )r   r   ró   r'   s   &&  r   Úopt_reactorÚ!ReactorSelectionMixin.opt_reactorü  sv   € ð	(Ü˜9Ô%ð  (�‹Oøô õ 	(ó &/ð1ð ô
 ×"Ò" 3Ó'Ð'Üõ 	(ó &'ð)ð ô
 ×"Ò" 3Ó'Ð'ûð	(ús   ‚ “0A'ÁA'ÁA"Á"A'rG   N)r+   r,   r-   r.   r/   r   ÚCompletionsr  ÚcompDatar>   r?   r  Ústaticmethodr   rÿ   r  r  r  Úopt_rr0   r1   r2   s   @r   r  r  Ö  sL   ø‡ € ñð × Ò ¨Y¸Ð,GÔH€Hà—J‘J€MÙ# H×$<Ñ$<Ó=Ðòò2(ð8 †Er"   r  c                   óÄ  a € ] tR tRt o Rt. RO. RO. RO.t. RO. RO. RORRRRRP                  ]P                  4      ,          .. RO. RO. RO. R O.t	]
P                  ! R!.R]
P                  ! R4      R	]
P                  ! R4      R
]
P                  ! R4      R]
P                  ! 4       /R7      t]! ]P"                  4      tR tR t]tR tR"R ltR t]R 4       tRtV tR# )#ÚServerOptionsi  zQtwistd reads a twisted.application.service.Application out of a file and runs it.NrZ   rW   z!Name of the profiler to use (%s).z, rµ   rï   rò   Úrundirz*.tapz
*.(tac|py)z*.tas)ÚmutuallyExclusiver  c                ó¤   € R V R&   RV9   d   VR,          V n         M\        P                   V n         \        P                  P	                  V 4       R# )Fr©   r?   N)r?   r>   r   ÚOptionsr    )r   r8   Úkws   &*,r   r    ÚServerOptions.__init__X  s:   € ØˆˆW‰Ø�rŒ>Ø˜X�,ˆD�KäŸ*™*ˆDŒKÜ�‰×Ñ˜tÖ$r"   c                óf   € \         P                  ! R4       \        P                  ! 4        RV R&   R# )zh
Run the application in the Python Debugger (implies nodaemon),
sending SIGUSR2 will drop into debugger
Tr©   N)r   ÚsetDebuggingr   ÚstartDebugModer‘   s   &r   Ú	opt_debugÚServerOptions.opt_debug`  s'   € ô
 	×Ò˜4Ô Ü×ÒÔ ØˆˆW‹r"   c                óº   € \         P                  ! \        P                  4        ^ RIpTP                  \        P                  4       R#   \
         d     R# i ; i)zs
Print an insanely verbose log of everything that happens.
Useful when debugging freezes or locks in complex code.
N)r>   Úsettracer   ÚspewerÚ	threadingr9   )r   r-  s   & r   Úopt_spewÚServerOptions.opt_spewk  sD   € ô
 	�Š”T—[‘[Ô!ð	Ûð 	×Ñœ4Ÿ;™;Ö'øô ô 	Úð	ús   ¦A ÁAÁAc                ó�   € Vf#   \         P                  R,          ;'       g    R.p\        P                  P	                  W4       R # )N:é   NNz--help)r>   Úargvr   r"  ÚparseOptionsrf   s   &&r   r3  ÚServerOptions.parseOptionsw  s0   € ØŠ?Ü—h‘h˜r•l×0Ð0 x jˆGÜ�‰×"Ñ" 4Ö1r"   c                ó  € V P                   '       g   V R ,          '       d   RV R&   V R,          e    \        V R,          4      V R&   R# R#   \         d3   p\        P                  ! RP                  T R,          T4      4      hRp?ii ; i)rï   TÚno_saver   Nz%Logger '{}' could not be imported: {})râ   r   rõ   r   r  r  )r   r'   s   & r   ÚpostOptionsÚServerOptions.postOptions|  s|   € Ø�?�?ˆ?˜d 8ŸnœnØ"ˆD�‰OØ��>Ò%ðÜ!)¨$¨x­.Ó!9��X“ñ &øô ô Ü×&Ò&Ø;×BÑBÀ4ÈÅ>ÐSTÓUóð ûðús   ³A ÁB	Á-BÂB	c              #  ó  "  € V P                  \        P                  4      p/ V n        \	        V\        R 4      R7       F;  pW P                  VP                  &   VP                  RV3R lVP                  3x € K=  	  R# 5i)rç   r  Nc                 ó"   € V P                  4       # r   )r^   )Úplugs   &r   r°   Ú+ServerOptions.subCommands.<locals>.<lambda>“  s
   €  $§,¡,¤.r"   )Ú_getPluginsr   ÚIServiceMakerrã   r
  r   rç   r  )r   Úpluginsr;  s   &  r   ÚsubCommandsÚServerOptions.subCommands‡  sp   é € à×"Ñ"¤7×#8Ñ#8Ó9ˆØˆÔÜ˜7¬
°9Ó(=×>ˆDØ/3×Ñ˜tŸ|™|Ñ,à—‘Øð !Ó0Ø× Ñ ðô ó ?ùs   ‚A>B )rã   r?   )rY   NzBsave the Stats object rather than the text output of the profiler.)r6  Úozdo not save state on shutdown)rá   r'   z(The specified tap/aos file is encrypted.)r   ÚlNz%log to a specified file, - for stdout)r   NNz•A fully-qualified name to a log observer factory to use for the initial log observer.  Takes precedence over --logfile and --syslog (when available).)r7   rD   Nz7Run in profile mode, dumping results to specified file.)rµ   Úfz
twistd.tapzread the given .tap file)rï   ÚyNz:read an application from within a Python file (implies -o))rò   r(   Nz2Read an application from a .tas file (AOT format).)r  ÚdÚ.z-Change to a supplied directory before running)rµ   rï   rò   r   )r+   r,   r-   r.   ÚlongdescÚoptFlagsÚjoinrV   r]   ÚoptParametersr   r  ÚCompleteFilesÚCompleteDirsr  r  r   Ú
getPluginsr=  r    r(  Úopt_br.  r3  r7  Úpropertyr@  r0   r1   r2   s   @r   r  r    s  ø‡ € ð	!ð ò	
ò
 	:ÚFð€Hò 	Hò	
ò	
ð ØØØ/°$·)±)¸K×<QÑ<QÓ2RÕRð		
ò 	@ò	
ò 	TÚMð=€MðB × Ò Ø7Ð8à�E×'Ò'¨Ó0Ø�e×)Ò)¨,Ó7Ø�e×)Ò)¨'Ó2Ø�e×(Ò(Ó*ð	
ô€Hñ ˜v×0Ñ0Ó1€Kò%òð €Eò
(ô2ò
	ð ñó ör"   r  c                 ó  € V! 4       p VP                  4        V ! V4       R#   \        P                   dM   pR P                  \        P
                  R,          4      p\        T4       \        T RT 24        Rp?R# Rp?ii ; i)Ú :r   é   Nr$   N)r3  r   ÚerrorrJ  r>   r2  r�   )ÚrunAppr  r¿   ÚueÚcommstrs   &&   r   r<   r<   ˜  sl   € Ù‹_€FðØ×ÑÔñ 	ˆvŽøô �;‰;ô "Ø—(‘(œ3Ÿ8™8 C�=Ó)ˆÜˆfŒÜ��	˜˜B˜4Ð ×!Ò!ûð"ús   ‰# £B¸AA?Á?Bc                 óô   € \         P                  ! WV4      p\        P                  ! V4      P	                  V4       \        V4      pV'       d   R p\        P                  ! V4      P                  W2R7       R # )N)rû   rì   )r   rô   r   ÚIPersistableÚsetStylerÊ   Úsave)ÚfileinÚtypeinrì   ÚfileoutÚtypeoutÚencryptrv   s   &&&&&& r   ÚconvertStylera  ¤  s[   € Ü×)Ò)¨&¸*ÓE€KÜ×Ò�[Ó!×*Ñ*¨7Ô3Ü" 7Ó+€JßØˆÜ×Ò�[Ó!×&Ñ&°Ð&ÖOr"   c                 ó4  € ^ RI Hp \        P                  ! V 4      P	                  4        V'       d5   \
        P                  ! V 4      pVP                  RRVP                  R4       VP                  RR\        P                  ! V 4      P                  4       R# )r   r|   ÚafterÚshutdownÚbeforeN)
r€   rC   r   ÚIServiceÚstartServicer   rY  ÚaddSystemEventTriggerr[  ÚstopService)rv   r[  rC   rD   s   &&  r   ÚstartApplicationrj  ­  sm   € Ý(ä×Ò�[Ó!×.Ñ.Ô0ßÜ×Ò˜[Ó)ˆØ×%Ñ% g¨z¸1¿6¹6À:ÔNØ×!Ñ!Ø�*œg×.Ò.¨{Ó;×GÑGör"   c                ó¤   € \         P                   ! V \         P                  4       \        P                  ! \        P                  ! 4       V 4       R# )zí
Force the application to terminate with the specified signal by replacing
the signal handler with the default and sending the signal to ourselves.

@param sig:  Signal to use to terminate the process with C{os.kill}.
@type sig:  C{int}
N)r¸   ÚSIG_DFLr¡   ÚkillÚgetpid)Úsigs   &r   Ú_exitWithSignalrp  ¹  s*   € ô ‡M‚M�#”v—~‘~Ô&Ü‡G‚GŒB�IŠI‹K˜Ör"   )NN)7rÄ   r¡   r¥   r¸   r>   r¼   rp   Úoperatorr   Útwistedr   r   r   Útwisted.applicationr   r   Útwisted.application.reactorsr	   r
   r€   r   Útwisted.internet.interfacesr   Útwisted.persistedr   Útwisted.pythonr   r   r   r   r   r   Útwisted.python.reflectr   r   r   r   r5   rJ   rV   ra   r§   rÂ   rÇ   rÊ   rÌ   ré   r  r  r"  r  r<   ra  rj  rp  rG   r"   r   Ú<module>ry     sã   ðó Û 	Û 
Û Û 
Û Û Ý ç -Ñ -ß 1÷ GÝ "Ý EÝ !ß F× Fß >Ñ >÷ñ ô<�Nô ô6 �^ô  ÷6Lñ L÷,o"ñ o"òd"ô,0òfò÷hñ hòVò2Q÷Bñ BôJz�E—M‘MÐ#8ô zòz	òPò	ô	r"   