;idZddlmZddlZddlZddlZddlZddl m Z ddl m Z ddl mZddlmZd Zdd ZejddZdaddZedkrddlmZeddeddSdS)z]A small application that can be used to test a WSGI server and check it for WSGI compliance. ) annotationsN)wrap)escape)Request)Responseaz WSGI Information

WSGI Information

This page displays all available information about the WSGI server and the underlying Python interpreter.

Python Interpreter

Python Version %(python_version)s
Platform %(platform)s [%(os)s]
API Version %(api_version)s
Byteorder %(byteorder)s
Werkzeug Version %(werkzeug_version)s

WSGI Environment

%(wsgi_env)s

Installed Eggs

The following python packages were installed on the system as Python eggs:

System Path

The following paths are the current contents of the load path. The following entries are looked up for Python packages. Note that not all items in this path are folders. Gray and underlined items are entries pointing to invalid resources or used by custom import hooks such as the zip importer.

Items with a bright background were expanded for display from a relative path. If you encounter such paths in the output you might want to check your setup as relative paths are usually problematic in multithreaded environments.

return"t.Iterator[tuple[str, bool, bool]]c#Ktjdkrdd}ndd}tjtj}t jD]}tj||ptjj}|tj|tj | ||kfVdS)Nposixxstrr ctjd}||rd|t |d}|S)N~)ospath expanduser startswithlen)r prefixs DC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\werkzeug/testapp.pystripziter_sys_path..stripbsLW'',,F||F## +*#f++--(**Hc|SNr s rrziter_sys_path..stripjsHr)r rr r) rnamerabspathgetcwdsysjoincurdirnormpathisdir)rcwditemrs r iter_sys_pathr(_s w'          '//")++ & &CSSw||C!788eBG$$T**++t1D1D-DddlRRRRRSSrreqrrc Z ddl}t|jd}n#t$rd}YnwxYwg}|D]_} |j}n#t t f$rd}YnwxYw|dt|j dt|d `g}t|j d }|D]w\}} d tttt| } |d t|d | dxg} t!D]{\} } } g}| r|d| r|d|rdd |dnd }| d|dt| |d tt"jtt"jtt(jt"jt"jt1d |d |d | d }t3t4|zdS)aSimple test application that dumps the environment. You can use it to check if Werkzeug is working properly: .. sourcecode:: pycon >>> from werkzeug.serving import run_simple >>> from werkzeug.testapp import test_app >>> run_simple('localhost', 3000, test_app) * Running on http://localhost:3000/ The application displays important information from the WSGI environment, the Python interpreter and the installed libraries. rNc4|jSr) project_namelowerrs rztest_app..s!...00r)keyrunknownz
  • z [z ]cPt|dS)Nr)reprr-rs rr.ztest_app..stAaDzz?O?O?Q?Qrzz zvirtualexpz class=" "zz
     ) python_versionplatformr api_version byteorderwerkzeug_version python_eggswsgi_envsys_pathz text/html)mimetype) pkg_resourcessorted working_set ImportErrorversion ValueErrorAttributeErrorappendrr,environitemsr"rrr2r(r! splitlinesr;rrr<r=_get_werkzeug_versionrTEMPLATE)r)rCeggsr?eggrGr@sorted_environr/valuerAr'r4expandedcss class_strcontexts rtest_apprXss   %00    %%%"$%K   kGGN+   GGG  P6#*++ P PfWoo P P P    HCK--//5Q5QRRRN$JJ USU !4!4556677H6#;;HH%HHHIIIIH#0??::gx  " JJy ! ! !   JJu   36>/sxx}}////B 8i88&,,889999!++fS[&9&9&D&D&F&FGG3<((RWoo]133yy--IIh''IIh''  G Hw& = = ==s --?AAr3rc\tstjdatS)Nwerkzeug)_werkzeug_version importlibmetadatarGrrrrNrNs* C%.66zBB r__main__) run_simple localhostiT) use_reloader)r r )r)rr r)r r)__doc__ __future__rimportlib.metadatar\rr!typingttextwrapr markupsaferwrappers.requestrwrappers.responserrOr( applicationrXr[rN__name__servingr_rrrrns=#""""" %%%%%%''''''J ZSSSS( <><><><>~ z######J{D(>>>>>>r