Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/Tools/scripts/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/Tools/scripts/__pycache__/serve.cpython-37.pyc

B

� f��@s�dZddlZddlZddlZddlmZmZdd�Zedkr�ej	dZ
eej	�dkrbeej	d�nd	Z
e�d
e
e�Zed�e
e
��ye��Wnek
r�ed�YnXdS)
a

Small wsgiref based web server. Takes a path to serve from and an
optional port number (defaults to 8000), then tries to serve files.
Mime types are guessed from the file names, 404 errors are raised
if the file is not found. Used for the make serve target in Doc.
�N)�
simple_server�utilcCs�tj�t|ddd��}d|�tjj�dkr>tj�|d�}t�|�d}tj�|�rx|dd|fg�t�	t
|d	��S|d
dg�dgSdS)
NZ	PATH_INFO��.���z
index.htmlrz200 OKzContent-Type�rbz
404 Not Found)zContent-Typez
text/plains	not found)�os�path�join�split�sep�	mimetypesZ
guess_type�existsrZFileWrapper�open)�environZrespond�fn�type�r�8/opt/alt/python37/lib64/python3.7/Tools/scripts/serve.py�app
sr�__main__r�i@�z(Serving {} on port {}, control-C to stopzShutting down.)�__doc__�sysrr
Zwsgirefrrr�__name__�argvr	�len�intZportZmake_serverZhttpd�print�formatZ
serve_forever�KeyboardInterruptrrrr�<module>s