Your IP : 216.73.216.213


Current Path : /opt/alt/python33/lib64/python3.3/Tools/scripts/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/Tools/scripts/__pycache__/serve.cpython-33.pyo

�
��f�c@s�dZddlZddlZddlZddlmZmZdd�Zedkr�ej	dZ
eej	�dkr�eej	d�nd	Z
ejd
e
e�Zedje
e
��yej�Wq�ek
r�ed�Yq�XndS(
u

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.
iN(u
simple_serveruutilcCs�tjjt|ddd��}d|jtjj�dkrZtjj|d�}ntj|�d}tjj|�r�|dd|fg�tj	t
|d��S|d	d
g�dgSdS(Nu	PATH_INFOiu.u
index.htmliu200 OKuContent-Typeurbu
404 Not Foundu
text/plains	not foundi����(uContent-Typeu
text/plain(uosupathujoinusplitusepu	mimetypesu
guess_typeuexistsuutiluFileWrapperuopen(uenvironurespondufnutype((u8/opt/alt/python33/lib64/python3.3/Tools/scripts/serve.pyuapp
s#uappu__main__iii@uu(Serving {} on port {}, control-C to stopuShutting down.(u__doc__usysuosu	mimetypesuwsgirefu
simple_serveruutiluappu__name__uargvupathulenuintuportumake_serveruhttpduprintuformatu
serve_foreveruKeyboardInterrupt(((u8/opt/alt/python33/lib64/python3.3/Tools/scripts/serve.pyu<module>s
.