Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
testapp.cpython-313.pyc115 linesDownload Raw Back to __pycache__
1�

2��j�����SrSSKJr SSKrSSKrSSKrSSKrSSK	J3r4 SSKJr SSK
Jr SSKJr S	rSS5jr\R&SSj5rSqSS
jr\S:XaSSKJr \"SS\SS9 gg)z]A small application that can be used to test a WSGI server and check6it for WSGI compliance.7�)�annotationsN)�wrap)�escape�)�Request)�Responseaz<!doctype html>8<html lang=en>9<title>WSGI Information</title>10<style type="text/css">11  @import url(https://fonts.googleapis.com/css?family=Ubuntu);12 13  body       { font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',14               'Verdana', sans-serif; background-color: white; color: #000;15               font-size: 15px; text-align: center; }16  div.box    { text-align: left; width: 45em; margin: auto; padding: 50px 0;17               background-color: white; }18  h1, h2     { font-family: 'Ubuntu', 'Lucida Grande', 'Lucida Sans Unicode',19               'Geneva', 'Verdana', sans-serif; font-weight: normal; }20  h1         { margin: 0 0 30px 0; }21  h2         { font-size: 1.4em; margin: 1em 0 0.5em 0; }22  table      { width: 100%%; border-collapse: collapse; border: 1px solid #AFC5C9 }23  table th   { background-color: #AFC1C4; color: white; font-size: 0.72em;24               font-weight: normal; width: 18em; vertical-align: top;25               padding: 0.5em 0 0.1em 0.5em; }26  table td   { border: 1px solid #AFC5C9; padding: 0.1em 0 0.1em 0.5em; }27  code       { font-family: 'Consolas', 'Monaco', 'Bitstream Vera Sans Mono',28               monospace; font-size: 0.7em; }29  ul li      { line-height: 1.5em; }30  ul.path    { font-size: 0.7em; margin: 0 -30px; padding: 8px 30px;31               list-style: none; background: #E8EFF0; }32  ul.path li { line-height: 1.6em; }33  li.virtual { color: #999; text-decoration: underline; }34  li.exp     { background: white; }35</style>36<div class="box">37  <h1>WSGI Information</h1>38  <p>39    This page displays all available information about the WSGI server and40    the underlying Python interpreter.41  <h2 id="python-interpreter">Python Interpreter</h2>42  <table>43    <tr>44      <th>Python Version45      <td>%(python_version)s46    <tr>47      <th>Platform48      <td>%(platform)s [%(os)s]49    <tr>50      <th>API Version51      <td>%(api_version)s52    <tr>53      <th>Byteorder54      <td>%(byteorder)s55    <tr>56      <th>Werkzeug Version57      <td>%(werkzeug_version)s58  </table>59  <h2 id="wsgi-environment">WSGI Environment</h2>60  <table>%(wsgi_env)s</table>61  <h2 id="installed-eggs">Installed Eggs</h2>62  <p>63    The following python packages were installed on the system as64    Python eggs:65  <ul>%(python_eggs)s</ul>66  <h2 id="sys-path">System Path</h2>67  <p>68    The following paths are the current contents of the load path.  The69    following entries are looked up for Python packages.  Note that not70    all items in this path are folders.  Gray and underlined items are71    entries pointing to invalid resources or used by custom import hooks72    such as the zip importer.73  <p>74    Items with a bright background were expanded for display from a relative75    path.  If you encounter such paths in the output you might want to check76    your setup as relative paths are usually problematic in multithreaded77    environments.78  <ul class="path">%(sys_path)s</ul>79</div>80c#��# �[RS:XaSSjnOSSjn[RR[R"55n[81RH�n[RR
X=(d [RR5nU"[RRU55[RRU5(+X2:g4v� M� g7f)N�posixc��[RRS5nURU5(aSU[	U5S3nU$)N�~)�os�path�82expanduser�83startswith�len)�x�prefixs  �VD:\code\apps\devtools\python\user_packages\Python313\site-packages\werkzeug/testapp.py�strip�iter_sys_path.<locals>.stripbsB���W�W�'�'��,�F��|�|�F�#�#���#�f�+�-�(�)�*���H�c��U$�N��rs rrrjs���Hr)r�str�returnr)84r
�namer�abspath�getcwd�sys�join�curdir�normpath�isdir)r�cwd�itemrs    r�
iter_sys_pathr(_s����	�w�w�'��	�	�
�'�'�/�/�"�)�)�+�85&�C������w�w�|�|�C�!7������8���B�G�G�$�$�T�*�+������t�1D�-D�d�l�R�R��s�C8C:c���SSKn[URSS9n/nUHDnURnURS[UR5S[U5S	35 MF /n[URR5S86S9nUH[up�SR[[[[U	55555n	URS[U5S
U	S35 M] /n87[!5Hvup�n
/nU(aURS5 U
(aURS5 U(aSSRU5S3OSnU88RSUS[U535 Mx SR[["R5R%55[["R&5[[(R*5["R,["R.[15SRU5SRU5SRU895S.	n[3[4U-SS9$![a SnGN7f=f![90[4a SnGN<f=f)a�Simple test application that dumps the environment.  You can use91it to check if Werkzeug is working properly:92 93.. sourcecode:: pycon94 95    >>> from werkzeug.serving import run_simple96    >>> from werkzeug.testapp import test_app97    >>> run_simple('localhost', 3000, test_app)98     * Running on http://localhost:3000/99 100The application displays important information from the WSGI environment,101the Python interpreter and the installed libraries.102rNc�6�URR5$r)�project_name�lowerrs r�<lambda>�test_app.<locals>.<lambda>�s��!�.�.�.�.�0r)�keyr�unknownz<li>z	 <small>[z	]</small>c�:�[US5R5$)Nr)�reprr,rs rr-r.�s��t�A�a�D�z�?O�?O�?Qr�z<tr><th>z103<td><code>z</code>�virtual�expz class="� �"z<li�>z<br>�104)	�python_version�platformr
�api_version�	byteorder�werkzeug_version�python_eggs�wsgi_env�sys_pathz	text/html)�mimetype)�
pkg_resources�sorted�working_set�ImportError�version�105ValueError�AttributeError�appendrr+�environ�itemsr"rrr2r(r!�106splitlinesr;r
rr<r=�_get_werkzeug_versionr�TEMPLATE)�reqrC�eggsr?�eggrGr@�sorted_environr/�valuerAr'r4�expanded�css�	class_str�contexts                 r�test_apprYss��107����%�%�0�108���K���	 ��k�k�G�	����6�#�*�*�+�,�I�f�W�o�5F�i�P�	109���H��C�K�K�-�-�/�5Q�R�N�$�110������S���U��!4�5�6�7�����(�6�#�;�-�z�%���H�I�%��H�#0�?���x�����J�J�y�!���J�J�u��36�h�s�x�x��}�o�Q�/�B�	����#�i�[��&��,��8�9�$3�!�+�+�f�S�[�[�&9�&D�&D�&F�G��3�<�<�(��R�W�W�o�����]�]�1�3��y�y��-��I�I�h�'��I�I�h�'�111�G��H�w�&��=�=��Y�%�"$��%���N�+�	 ��G�	 �s"�I�I�I�I�I,�+I,r3c�b�[(d[RRS5q[$)N�werkzeug)�_werkzeug_version�	importlib�metadatarGrrrrNrN�s'����%�.�.�6�6�z�B���r�__main__)�112run_simple�	localhosti�T)�use_reloader)rz"t.Iterator[tuple[str, bool, bool]])rPrrr)rr)�__doc__�113__future__r�importlib.metadatar]r
r!�typing�t�textwrapr�114markupsafer�wrappers.requestr�wrappers.responserrOr(�applicationrYr\rN�__name__�servingr`rrr�<module>ros~���#��	�115����%�'�J��ZS�(	���<>��<>�~����z��#��{�D�(��>�r
codekingpro/portable-devtools · Team Ai