Viewing File: /opt/alt/python35/lib64/python3.5/site-packages/aiohttp/__pycache__/web.cpython-35.opt-1.pyc



Z@sAddlZddlZddlZddlmZddlmZddlmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZddlmZddlmZdd	lTdd	l
Tdd	lTdd	lTdd	lTdd	lTdd	lTdd
lmZmZmZmZmZdd	lTdd	lTdd	lTejeje
jejejejejejejejejd!Zddd
ddddddddddeddde
j de
j j!deddddddddZ"ddZ#e$d kr=e#ej%dddS)"N)ArgumentParser)Iterable)
import_module)helpersweb_appweb_exceptionsweb_fileresponseweb_middlewaresweb_protocolweb_requestweb_response
web_runner
web_serverweb_urldispatcherweb_ws)
access_logger)Application)*)	AppRunnerGracefulExitSockSiteTCPSiteUnixSiterun_apphostportpathsockshutdown_timeoutgN@ssl_contextprintbacklogaccess_log_classaccess_log_format
access_loghandle_signalsT
reuse_address
reuse_portcCs0tj}t|d|d|	d|
d|}|j|jg}z|dk	rt|tttt	fr|j
t|||d|d|d|d	|
d
|qSx|D]=}|j
t|||d|d|d|d	|
d
|qWn[|dkr|dks|dk	rS|j
t|d|d|d|d|d	|
d
||dk	rt|tttt	fr|j
t||d|d|d|n9x6|D].}|j
t||d|d|d|qW|dk	r]t|t
s$|j
t||d|d|d|n9x6|D].}|j
t||d|d|d|q+Wx!|D]}|j|jqdWyL|rtdd
|jD}|djdj||jWnttfk
rYnXWd|j|jXt|dr"|j|j|jdS)zRun an app locallyr'r$r%r&Nrr r"r(r)rcss|]}t|jVqdS)N)strname).0sr./web.py	<genexpr>oszrun_app.<locals>.<genexpr>z6======== Running on {} ========
(Press CTRL+C to quit)z, shutdown_asyncgens)asyncioZget_event_looprZrun_until_completeZsetup
isinstancer*bytes	bytearray
memoryviewappendrrrrstartsortedsitesformatjoinZrun_foreverrKeyboardInterruptcleanuphasattrr1close)apprrrrrr r!r"r$r%r&r'r(r)ZloopZrunnerr:hpr-Zsitenamesr.r.r/r(s	

$





		cCstdddd}|jddddd	|jd
dddd
d|jdddddtd
d|jdddd|j|\}}|jjd\}}}|s|r|jd|jdr|jdyt|}Wn<t	k
r7}z|jd||fWYdd}~XnXyt
||}	Wn)tk
rv|jd||fYnX|jdk	rt
tdr|jd|	|}
t|
d|jd |jd!|j|jd"d#dS)$Ndescriptionzaiohttp.web Application serverprogzaiohttp.web
entry_funchelpzvCallable returning the `aiohttp.web.Application` instance to run. Should be specified in the 'module:function' syntax.metavarz
entry-funcz-Hz
--hostnamez2TCP/IP hostname to serve on (default: %(default)r)default	localhostz-Pz--portz.TCP/IP port to serve on (default: %(default)r)typeZ8080z-Uz--pathzjUnix file system path to serve on. Specifying a path will cause hostname and port arguments to be ignored.:z,'entry-func' not in 'module:function' syntax.z#relative module names not supportedzunable to import %s: %szmodule %r has no attribute %rAF_UNIXz=file system paths not supported by your operating environmentrrrmessagezStopped
)radd_argumentintZparse_known_argsrG	partitionerror
startswithrImportErrorgetattrAttributeErrorrr?socketrhostnamerexit)argvZ
arg_parserargsZ
extra_argvZmod_str_Zfunc_strmoduleexfuncrAr.r.r/main|sN				
*

%rb__main__)r)&r2rYsysargparsercollectionsr	importlibrrrrr	r
rrr
rrrrlogrrrrrrr__all__r!ZAccessLoggerZ
LOG_FORMATrrb__name__r\r.r.r.r/<module>s<R






(



LO8
Back to Directory File Manager