| Server IP : 43.141.50.122 / Your IP : 113.219.202.44 Web Server : Apache System : Linux VM-8-5-opencloudos 6.6.34-9.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 19 19:35:45 CST 2024 x86_64 User : www ( 1000) PHP Version : 8.1.27 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib64/python3.11/curses/__pycache__/ |
Upload File : |
�
��e� � � � d Z ddlZddlZd� Z G d� d� � Zedk r*d� Z ej e� � Z e d e
e� � � � dS dS ) z:Simple textbox editing widget with Emacs-like keybindings.� Nc �f � | � |dz |t j ||z
dz
� � | � ||dz t j ||z
dz
� � | � ||dz t j ||z
dz
� � | � |dz |t j ||z
dz
� � | � ||t j � � | � ||t j � � | � ||t j � � | � ||t j � � dS )z^Draw a rectangle with corners at the provided upper-left
and lower-right coordinates.
� N)
�vline�curses� ACS_VLINE�hline� ACS_HLINE�addch�ACS_ULCORNER�ACS_URCORNER�ACS_LRCORNER�ACS_LLCORNER)�win�uly�ulx�lry�lrxs �'/usr/lib64/python3.11/curses/textpad.py� rectangler s
� � �I�I�c�!�e�S�&�*�C�#�I��M�:�:�:��I�I�c�3�q�5�&�*�C�#�I��M�:�:�:��I�I�c�3�q�5�&�*�C�#�I��M�:�:�:��I�I�c�!�e�S�&�*�C�#�I��M�:�:�:��I�I�c�3��+�,�,�,��I�I�c�3��+�,�,�,��I�I�c�3��+�,�,�,��I�I�c�3��+�,�,�,�,�,� c �@ � e Zd ZdZdd�Zd� Zd� Zd� Zd� Zd� Z dd
�Z
d S )
�Textboxad Editing widget using the interior of a window object.
Supports the following Emacs-like key bindings:
Ctrl-A Go to left edge of window.
Ctrl-B Cursor left, wrapping to previous line if appropriate.
Ctrl-D Delete character under cursor.
Ctrl-E Go to right edge (stripspaces off) or end of line (stripspaces on).
Ctrl-F Cursor right, wrapping to next line when appropriate.
Ctrl-G Terminate, returning the window contents.
Ctrl-H Delete character backward.
Ctrl-J Terminate if the window is 1 line, otherwise insert newline.
Ctrl-K If line is blank, delete it, otherwise clear to end of line.
Ctrl-L Refresh screen.
Ctrl-N Cursor down; move down one line.
Ctrl-O Insert a blank line at cursor location.
Ctrl-P Cursor up; move up one line.
Move operations do nothing if the cursor is at an edge where the movement
is not possible. The following synonyms are supported where possible:
KEY_LEFT = Ctrl-B, KEY_RIGHT = Ctrl-F, KEY_UP = Ctrl-P, KEY_DOWN = Ctrl-N
KEY_BACKSPACE = Ctrl-h
Fc � � || _ || _ | � � � d| _ d | _ |� d� � d S �Nr )r �insert_mode�_update_max_yx�stripspaces�lastcmd�keypad)�selfr r s r �__init__zTextbox.__init__+ sE � ����&����������������
�
�1�
�
�
�
�
r c �f � | j � � � \ }}|dz
| _ |dz
| _ d S r )r �getmaxyx�maxy�maxx)r r$ r% s r r zTextbox._update_max_yx3 s3 � ��X�&�&�(�(�
��d��1�H�� ��1�H�� � � r c � � | � � � | j } t j � | j � ||� � � � t j j k rt | j |dz � � }n
|dk rn|dz
}�q|S )zuGo to the location of the first blank on the given line,
returning the index of the last non-blank character.Tr r )r r% r �asciir �inch�SP�min)r �y�lasts r �_end_of_linezTextbox._end_of_line8 s� � �
�������y�� ��|�!�!�$�(�-�-��4�"8�"8�9�9�V�\�_�L�L��4�9�d�1�f�-�-���������!�8�D�
� �r c � � | � � � | j � � � \ }}d }|| j k s|| j k r�| j r| j � � � } | j � |� � n# t j $ r Y nw xY w| j rt j
� |� � sn:|}| j � � � \ }}|�||f}|| j k ��|| j k ��|� | j j |� d S d S �N)
r r �getyxr$ r% r r( r
r �errorr'