AlkantarClanX12
Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/ |
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/cgitb.cpython-310.pyc |
o 6��f@/ � @ 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 �,/opt/alt/python310/lib64/python3.10/cgitb.py�reset# s r c C � | rd| d S dS )Nz<small>z</small>� r ��textr r r �small. � r c C r )Nz<strong>z </strong>r r r r r r �strong4 r r c C r )Nz<font color="#909090">z</font>r r r r r r �grey: r r c C s� | |v r d|| fS | |j v rd|j | fS d|j v rB|j d }t|�ti �u r6| |v r2d|| fS dtfS t|| �rBdt|| �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\}}}}}t�| �D ]V\}} } }}|tjkr |S |tjkrT| tjvrT|dkrC|t urBt|| t �}|�|| ||f� n"t | ||�\} }|�| | |f� n| dkra||d 7 }|}nd\}}| }q|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$ ��r- � c "