← Back
Editing: repr.cpython-311.pyc
� ��b% � � � d Z ddlZddlZddlZddlZddlmZ ddlm Z ddl mZ e� � Z ej d� � Z ee� � ZdZdZd ed efd�Ze fd ed dfd�Z G d � d� � Z e� � Zded edej ej ej ej df f d efd�Z ddededej ded ej dej e gef f d�Z! G d� d� � Z"dS )z�Object representations for debugging purposes. Unlike the default repr, these expose more information and produce HTML instead of ASCII. Together with the CSS and JavaScript of the debugger this gives a colorful and more compact output. � N)�deque)�format_exception_only)�escapez(?:\r\n|\r|\n){2,}zL<div class=box> <h3>%(title)s</h3> <pre class=help>%(text)s</pre> </div>zQ<div class=box> <h3>%(title)s</h3> %(repr)s <table>%(items)s</table> </div>�obj�returnc �D � t � � � | � � S )z1Creates a debug repr of an object as HTML string.)�DebugReprGenerator�repr)r s �5/usr/lib/python3/dist-packages/werkzeug/debug/repr.py� debug_reprr # s � ����$�$�S�)�)�)� c � � t � � }| t u r-|� t j d� � j � � }n|� | � � }t j � |� � dS )zdPrint the object details to stdout._write (for the interactive console of the web debugger. � N) r �missing�dump_locals�sys� _getframe�f_locals�dump_object�stdout�_write)r �gen�rvs r �dumpr ( se � � � � �C� �g�~�~� �_�_�S�]�1�-�-�6� 7� 7��� �_�_�S� !� !���J���b�����r c �P � e Zd ZdZdefd�Zddej ej ddfd�Z dS )�_Helperz�Displays an HTML version of the normal help, for the interactive debugger only because it requires a patched sys.stdout. r c � � dS )Nz(Type help(object) for help about object.� ��selfs r �__repr__z_Helper.__repr__9 s � �9�9r N�topicc �& � |�%t j � d| �d�� � d S dd l}|� |� � t j � � � }t |t � � r|� dd� � }t � |� � }t |� � dk r&|d }d� |dd � � � }n d}|d }t j � t ||d �z � � d S ) Nz<span class=help>�</span>r zutf-8�ignorer z �Help)�title�text)r r r �pydoc�help�reset� isinstance�bytes�decode� _paragraph_re�split�len�join� HELP_HTML)r r"