AlkantarClanX12
Current Path : /lib64/python3.6/__pycache__/ |
Current File : //lib64/python3.6/__pycache__/cgitb.cpython-36.pyc |
3 \�. � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z dd� Zg Zdd� Z dd� Zd d � Zdd� Zd d� Zddd�Zddd�ZG dd� d�Ze� jZddd�ZdS )a� More comprehensive traceback formatting for Python scripts. To enable this module, do: import cgitb; cgitb.enable() at the top of your script. The optional arguments to enable() are: display - if true, tracebacks are displayed in the web browser logdir - if set, tracebacks are written to files in this directory context - number of lines of source code to show for each stack frame format - 'text' or 'html' controls the output format By default, tracebacks are displayed but not saved, the context is 5 lines and the output format is 'html' (for backwards compatibility with the original use of this module) Alternatively, if you have caught an exception and want cgitb to display it for you, call cgitb.handler(). The optional argument to handler() is a 3-item tuple (etype, evalue, etb) just like the value of sys.exc_info(). The default handler displays output as HTML. � Nc C s dS )zAReturn a string that resets the CGI and browser to a known state.a' <!--: spam Content-Type: text/html <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> --> </font> </font> </font> </script> </object> </blockquote> </pre> </table> </table> </table> </table> </table> </font> </font> </font>� r r r �/usr/lib64/python3.6/cgitb.py�reset# s r c C s | rd| d S dS d S )Nz<small>z</small>� r )�textr r r �small. s r c C s | rd| d S dS d S )Nz<strong>z </strong>r r )r r r r �strong4 s r c C s | rd| d S dS d S )Nz<font color="#909090">z</font>r r )r r r r �grey: s r c C s� | |krd|| fS | |j kr,d|j | fS d|j kr~|j d }t|�ti �krf| |kr~d|| fS nt|| �r~dt|| �fS dtfS )z9Find the value for a given name in the given environment.�local�global�__builtins__�builtinN)� f_globals�type�hasattr�getattr� __UNDEF__)�name�frame�locals�builtinsr r r �lookup@ s r c C s� g dddt f\}}}}}x�tj| �D ]�\}} } }}|tjkr>P |tjkr�| tjkr�|dkr�|t k r�t|| t �}|j|| ||f� q�t | ||�\} }|j| | |f� n"| dkr�||d 7 }|}nd\}}| }q$W |S )zEScan one logical line of Python and look up values of variables used.Nr �.)Nr ) r �tokenize�generate_tokens�NEWLINE�NAME�keyword�kwlistr �appendr )�readerr r �varsZ lasttoken�parent�prefix�valueZttype�token�start�end�line�wherer r r �scanvarsP s"