| 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/_pyrepl/__pycache__/ |
Upload File : |
R
>lqj c �T � Q s QQQQQQQQQQQQ Q
QQQ
QQQQQQ-s- QQaQQaQQaQQaQQaQQ aQQaQQaQQaQQaQQaQQaQ Q aQ!Q!aQ"Q"aQ#Q#aQ$Q$a- Q%Q%aQ&Q&aQ'Q'aQ(Q(aQ)Q)aQ*Q*aQ+Q+aQ,Q,aQ-Q-aQ.Q.aQ/Q/aQ0Q0aQ1Q1aQ2Q2aQ3QaQ4Q4aQ5Q6aAQ7QQ8Q8-As Q9 Q:\2 sQ; Q< ksQ= Q> ksQ@Q? ksP! )Aan
Keymap contains functions for parsing keyspecs and turning keyspecs into
appropriate sequences.
A keyspec is a string representing a sequence of key presses that can
be bound to a command. All characters other than the backslash represent
themselves. In the traditional manner, a backslash introduces an escape
sequence.
pyrepl uses its own keyspec format that is meant to be a strict superset of
readline's KEYSEQ format. This means that if a spec is found that readline
accepts that this doesn't, it should be logged as a bug. Note that this means
we're using the '\C-o' style of readline's keyspec, not the 'Control-o' sort.
The extension to readline is that the sequence \<KEY> denotes the
sequence of characters produced by hitting KEY.
Examples:
'a' - what you get when you hit the 'a' key
'\EOA' - Escape - O - A (up, on my terminal)
'\<UP>' - the up arrow key
'\<up>' - ditto (keynames are case-insensitive)
'\C-o', '\c-o' - control-o
'\M-.' - meta-period
'\E.' - ditto (that's how meta works for pyrepl)
'\<tab>', '\<TAB>', '\t', '\011', '\x09', '\X09', '\C-i', '\C-I'
- all of these are the tab character.
�\�'�"�a��b��e��f��n�
�r�
�t� �v�� backspace�delete�down�end�enter�escape�f1�f2�f3�f4�f5�f6�f7�f8�f9�f10�f11�f12�f13�f14�f15�f16�f17�f18�f19�f20�home�insert�leftz page downzpage up�return�right�space� �tab�upc � � \ sQ s]hsQsP! )�KeySpecError� )�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r9 � �#C:\Python315\\Lib\_pyrepl\keymap.pyr8 r8 h s � �r? r8 c �H � U ]6� c PgQ[ Q[ [ * -! )� �keysr1 )�str�list)�formats "r@ �__annotate__�parse_keys.__annotate__l s � �
�
�S�
�T�#�Y�
r? c �p � ] o, oU[ U 2 6 c! [ V2 v q1UO U2 J0 U! )z3Parse keys in keyspec format to a sequence of keys.)�len�_parse_single_key_sequence�extend)rC �sr �ks & r@ �
parse_keysrO l s3 � � �A��A�
�c�$�i�-�)�$�2��� ������Hr? c �v � U ]6� c PgQ[ Q[ Q[ [ [ * [ 1* -! )rB �keyrM r1 )rD �int�tuplerE )rF s "r@ rG �'_parse_single_key_sequence.__annotate__v s3 � � L� L�C� L�C� L�E�$�s�)�S�.�4I� Lr? c �~ � ] o] oPoU% Cf� U[ U 2 6 Cc� V* Q6X Cc� V]* * O 2 oU[ 7 c [ U* oU]*
oJh UQ6X cr V]* * Q6w c% [ QU]* [ U 2 1* 2 gU% c% [ QU]* [ U 2 1* 2 g]oU]*
oJ� UQ6X cs V]* * Q6w c% [ QU]* [ U 2 1* 2 gU% c% [ QU]* [ U 2 1* 2 g]oU]*
oCJY UO 2 % c4 V]* U]* o[
[ U]2 2 oU]*
oCJ� UQ 6X c4 V]* U]* o[
[ U]2 2 oU]*
oCJ� UQ
6X c� U O QU2 oUP6X c% [ QU]* [ U 2 1* 2 gV]* U O 2 oU[ 7 c% [ Q
VA]* [ U 2 1* 2 g[ U* oU]* oCJ� [ Q[ U2 U]* [ U 2 1* 2 gV* oU]*
oCJ� U% cE [ U2 ]6X c [
[ U2 ]* 2 oLUQ7 c QU 0oL[ Q2 gU,U1oU% c U] * O ] Q2 U! )� r �c�-z*\C must be followed by `-' (char %d of %s)zdoubled \C- (char %d of %s)�mz*\M must be followed by `-' (char %d of %s)zdoubled \M- (char %d of %s)�x�<�>z)unterminated \< starting at char %d of %sz*unrecognised keyname `%s' at char %d of %sz,unknown backslash escape %s at char %d of %szctrl z\C- followed by invalid keyr > r0 r2 )rJ �lower�_escapesr8 �repr�isdigit�chrrR �find� _keynames�ordr/ ) rQ rM �ctrl�meta�retrW r r �results && r@ rK rK v s� � ��D��D�
�C��c�a�#�c�(�l��6�T�>���E�
� � �"�A��H�}��q�k���Q����c���1�u�:��$�&�E��q�5�$�s�)�,�-�� � �&�6�!�a�%��c��9K�K�� � ���Q����c���1�u�:��$�&�E��q�5�$�s�)�,�-�� � �&�6�!�a�%��c��9K�K�� � ���Q���������A���A��&���#�a��)�n���Q����c���A���A��&���#�a��*�o���Q����c���H�H�S�!�$����7�&�D��q�5�$�s�)�,�-�� � �a�%�!�n�*�*�,���i�'�&�D��A��t�C�y�1�2�� � ��n����E��"�B��A�w��A��t�C�y�1�2�� �
�&�C�
��F�A���s�8�q�=��c�#�h��o�&�C�
�%�
%��#��-�C��=�>�>��U�A�X�F���q� ����F�#��Mr? c � � - oU O 2 F DI v q4[ U[ 2 % c UQ * oL U] * oVBO U- 2 UQ* $ JK UO 2 F DR v q4V7 c; [ U2 ]6w c [ QUO
2 8 Q02 gVA* V#$ JE [ VA2 V#$ JT U! ):N� N:rj NNzkey definitions for z clash)�items�
isinstance�bytes�
setdefaultrJ r8 �values�compile_keymap)�keymap�emptyr rQ �value�firsts && r@ rp rp � s� � �
�A��l�l�n�
���c�5�!�!���G�E���F�E�+0���U�B���B��(� %� �g�g�i�
���>��5�z�Q��"�U�\�\�^�#U�V�V�����#�E�1�A�F� �
�Hr? )r? )�__doc__r^ rc � Exceptionr8 rO rK rp r9 r? r@ �<module>rw s ��*�<