403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/jedi/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p�{c`��h�dZddlZddlmZddlZddlZddlZddlZddlZddl	m
Z
dZedfd�Zd�Z
dS)z
Utilities for end-users.
�N)�
namedtuple)�InterpreterFc����tr!tjddtj���G��fd�d��}	ddl}ddl}|�|��j��|�d��|�d	��|�d
��|�d��|�d��|�	d
��dS#t$rtd��YdSwxYw)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�ZdS)�setup_readline.<locals>.JediRLc����|dk�rtj�dtj����	tjdt���z��t��j	g��}|�
����}tjd|���fd�|D��|_n.#tjdtj��z���xYw	tj�d��n$#tj�d��wxYw	|j|S#t $rYdSwxYw)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: %sc�^��g|])}�dt���|jz
�|jz��*S)N)�len�_like_name_length�name_with_symbols)�.0�c�texts  ��,/usr/lib/python3/dist-packages/jedi/utils.py�
<listcomp>z;setup_readline.<locals>.JediRL.complete.<locals>.<listcomp>YsJ���$�$�$���=�c�$�i�i�!�*=�=�=�>��AT�T�$�$�$�zREPL Completion error:
N)�sys�path�insert�os�getcwd�logging�debug�reprr�__dict__�complete�matches�error�	traceback�
format_exc�pop�
IndexError)�selfr�state�interpreter�completionsr
�namespace_modules `   ��rr!z'setup_readline.<locals>.JediRL.completeEsF������z�z������2�9�;�;�/�/�/�$��M�";�d�4�j�j�"H�I�I�I�"-�d�5E�5N�4O�"P�"P�K�"-�"6�"6�U�"6�"C�"C�K��M�"8�+�F�F�F�$�$�$�$�!,�$�$�$�D�L�L����M�"<�y�?S�?U�?U�"U�V�V�V�����
!��H�L�L��O�O�O�O��C�H�L�L��O�O�O�O����
��|�E�*�*���
�
�
��t�t�
���s0�A8B5�4D�5+C � D�!D%�)D6�6
E�EN)�__name__�
__module__�__qualname__r!)r
r,s��r�JediRLrDs3������� 	� 	� 	� 	� 	� 	� 	� 	rr0rNz
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
r0r5r6s``   r�setup_readliner<s^����T�
���$���-�	
�	
�	
�	
�!�!�!�!�!�!�!�!�!�!�!�F*�
	��������	���v�v�x�x�0�1�1�1�����0�0�0���� ?�@�@�@���� <�=�=�=���� >�?�?�?���� H�I�I�I��%�%�b�)�)�)�)�)���6�6�6�
�4�5�5�5�5�5�5�6���s�C&�&D�Dc��tdd��}ddlm}tjd|��}|d�t|��D���S)z_
    Returns a namedtuple of Jedi's version, similar to Python's
    ``sys.version_info``.
    �Versionzmajor, minor, micror)�__version__z
[a-z]+|\d+c�B�g|]\}}|dkr|nt|����S)�)�int)r�i�xs   rrz version_info.<locals>.<listcomp>�s.��I�I�I���A�!�q�&�&�Q�Q�c�!�f�f�I�I�Ir)r�jedir?�re�findall�	enumerate)r>r?�tupls   r�version_inforJ~sY��
��$9�:�:�G� � � � � � �
�:�m�[�1�1�D��7�I�I��4���I�I�I�J�Jr)�__doc__�__main__�collectionsrrr$rFrrrErr2r<rJ�rr�<module>rOs���������"�"�"�"�"�"���������	�	�	�	�	�	�	�	�
�
�
�
���������%-�E�h*�h*�h*�h*�VK�K�K�K�Kr

Youez - 2016 - github.com/yon3zu
LinuXploit