403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/jedi/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/jedi/__pycache__/utils.cpython-312.pyc
�

ŠeH��f�dZddlZddlmZddlZddlZddlZddlZddlZddl	m
Z
dZedfd�Zd�Z
y)z
Utilities for end-users.
�N)�
namedtuple)�InterpreterFc�����tr&tjddtj��G��fd�d�}	ddl}ddl}|j
|�j�|jd�|jd	�|jd
�|jd�|jd�|jd
�y#t$rtd�YywxYw)a�
    This function sets up :mod:`readline` to use Jedi in a Python interactive
    shell.

    If you want to use a custom ``PYTHONSTARTUP`` file (typically
    ``$HOME/.pythonrc.py``), you can add this piece of code::

        try:
            from jedi.utils import setup_readline
        except ImportError:
            # Fallback to the stdlib readline completer if it is installed.
            # Taken from http://docs.python.org/2/library/rlcompleter.html
            print("Jedi is not installed, falling back to readline")
            try:
                import readline
                import rlcompleter
                readline.parse_and_bind("tab: complete")
            except ImportError:
                print("Readline is not installed either. No tab completion is enabled.")
        else:
            setup_readline()

    This will fallback to the readline completer if Jedi is not installed.
    The readline completer will only complete names in the global namespace,
    so for example::

        ran<TAB>

    will complete to ``range``.

    With Jedi the following code::

        range(10).cou<TAB>

    will complete to ``range(10).count``, this does not work with the default
    cPython :mod:`readline` completer.

    You will also need to add ``export PYTHONSTARTUP=$HOME/.pythonrc.py`` to
    your shell profile (usually ``.bash_profile`` or ``.profile`` if you use
    bash).
    z
/tmp/jedi.log�a)�filename�filemode�levelc���eZdZ��fd�Zy)�setup_readline.<locals>.JediRLc����|dk(r�tjjdtj��	tjdt|�z�t|�jg�}|j���}tjd|�|D�cgc]*}|dt|�|jz
|jz��,c}|_	tjj%d�	|j|Scc}w#tjdt!j"�z��xYw#tjj%d�wxYw#t&$rYywxYw)a
            This complete stuff is pretty weird, a generator would make
            a lot more sense, but probably due to backwards compatibility
            this is still the way how it works.

            The only important part is stuff in the ``state == 0`` flow,
            everything else has been copied from the ``rlcompleter`` std.
            library module.
            rzStart REPL completion: )�fuzzyzREPL completions: %sNzREPL Completion error:
)�sys�path�insert�os�getcwd�logging�debug�reprr�__dict__�complete�len�_like_name_length�name_with_symbols�matches�error�	traceback�
format_exc�pop�
IndexError)�self�text�state�interpreter�completions�cr
�namespace_modules      ���,/usr/lib/python3/dist-packages/jedi/utils.pyrz'setup_readline.<locals>.JediRL.completeEs'�����z�������2�9�9�;�/�$��M�M�";�d�4�j�"H�I�"-�d�5E�5N�5N�4O�"P�K�"-�"6�"6�U�"6�"C�K��M�M�"8�+�F�"-�$���=�c�$�i�!�*=�*=�=�>��AT�AT�T�$�D�L��H�H�L�L��O�
��|�|�E�*�*��$����M�M�"<�y�?S�?S�?U�"U�V����H�H�L�L��O���
��
�s<�A$D
�/D�
D
�6E�D
�
-D7�7D:�:!E�	E*�)E*N)�__name__�
__module__�__qualname__r)r
r's��r(�JediRLrDs��� 	�r,rNz
tab: completezset completion-ignore-case onzset show-all-if-unmodifiedzset show-all-if-ambiguous onz&set completion-prefix-display-length 2�z$Jedi: Module readline not available.)�READLINE_DEBUGr�basicConfig�DEBUG�rlcompleter�readline�
set_completerr�parse_and_bind�set_completer_delims�ImportError�print)r'r
r,r2r3s``   r(�setup_readliner9s����T����$���-�-�	
�!�!�F*�
	��	���v�x�0�0�1�����0���� ?�@���� <�=���� >�?���� H�I��%�%�b�)���6�
�4�5�6�s�C�C#�"C#c	��tdd�}ddlm}tjd|�}|t|�D��cgc]\}}|dk(r|n
t
|���c}}�Scc}}w)z_
    Returns a namedtuple of Jedi's version, similar to Python's
    ``sys.version_info``.
    �Versionzmajor, minor, micror)�__version__z
[a-z]+|\d+�)r�jedir<�re�findall�	enumerate�int)r;r<�tupl�i�xs     r(�version_inforF~sT��
��$9�:�G� �
�:�:�m�[�1�D���4��I���A�!�q�&�Q�c�!�f�,�I�J�J��Is�A
)�__doc__�__main__�collectionsrrrr?rrr>rr/r9rF�r-r(�<module>rKs?����"���	�	�
����%-�E�h*�VKr-

Youez - 2016 - github.com/yon3zu
LinuXploit