Tryag File Manager
Home
-
Turbo Force
Current Path :
/
proc
/
self
/
root
/
proc
/
self
/
root
/
usr
/
lib
/
python2.4
/
curses
/
Upload File :
New :
File
Dir
//proc/self/root/proc/self/root/usr/lib/python2.4/curses/textpad.pyc
mò ‚=5Dc�����������@���sp���d��Z��d�k�Z�d�k�Z�d�„��Z�d�f��d�„��ƒ��YZ�e�d�j�o+�d�„��Z�e�i�e�ƒ�Z�d�Ge �e�ƒ�GHn�d�S(���s:���Simple textbox editing widget with Emacs-like keybindings.Nc���������C���sð���|��i�|�d�|�t�i�|�|�d�ƒ�|��i�|�|�d�t�i�|�|�d�ƒ�|��i�|�|�d�t�i�|�|�d�ƒ�|��i�|�d�|�t�i�|�|�d�ƒ�|��i �|�|�t�i�ƒ�|��i �|�|�t�i�ƒ�|��i �|�|�t�i �ƒ�|��i �|�|�t�i�ƒ�d�S(���s^���Draw a rectangle with corners at the provided upper-left and lower-right coordinates. i���N(���t���wint���vlinet���ulyt���ulxt���cursest ���ACS_VLINEt���lryt���hlinet ���ACS_HLINEt���lrxt���addcht���ACS_ULCORNERt���ACS_URCORNERt���ACS_LRCORNERt���ACS_LLCORNER(���R����R���R���R���R ���(����(����t$���/usr/lib/python2.4/curses/textpad.pyt ���rectangle���s�����%%%%t���Textboxc�����������B���s>���t��Z�d��Z�d�„��Z�d�„��Z�d�„��Z�d�„��Z�e�d�„�Z�RS(���sd��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 c���������C���sd���|�|��_��|�i�ƒ��\�|��_�|��_�|��i�d�|��_�|��i�d�|��_�d�|��_�d��|��_�|�i�d�ƒ�d��S(���Ni���( ���R����t���selft���getmaxyxt���maxyt���maxxt���stripspacest���Nonet���lastcmdt���keypad(���R���R����(����(����R���t���__init__*���s���� c���������C���st���|��i�}�xd�t�i�|��i�i�|�|�ƒ�ƒ�t�i�j�o�t�|��i�|�d�ƒ�}�Pn�|�d�j�o�Pn�|�d�}�q�W|�S(���s8���Go to the location of the first blank on the given line.i���i����N( ���R���R���t���lastt���asciiR����t���incht���yt���SPt���min(���R���R���R���(����(����R���t���_end_of_line3���s����� ��( c���������C���s˜��|��i�i�ƒ��\�}�}�|�|��_�t�i�|�ƒ�oU�|�|��i �j��p�|�|��i �j��o1�y�|��i�i�|�ƒ�Wq�t�i �j �o�q�Xq”n|�t�i�j�o�|��i�i�|�d�ƒ�në|�t�i�t�i�t�i�t�i�f�j�o³�|�d�j�o�|��i�i�|�|�d�ƒ�n^�|�d�j�o�nM�|��i�o(�|��i�i�|�d�|��i�|�d�ƒ�ƒ�n�|��i�i�|�d�|��i �ƒ�|�t�i�t�i�f�j�o�|��i�i�ƒ��q”n|�t�i�j�o�|��i�i�ƒ��nò|�t�i�j�oD�|��i�o �|��i�i�|�|��i�|�ƒ�ƒ�q”|��i�i�|�|��i �ƒ�nž|�t�i�t�i�f�j�oZ�|�|��i �j��o�|��i�i�|�|�d�ƒ�q”|�|��i �j�o�q”|��i�i�|�d�d�ƒ�n+|�t�i�j�o�d�Sn|�t�i�j�oG�|��i �d�j�o�d�Sq”|�|��i �j��o�|��i�i�|�d�d�ƒ�q”n¼|�t�i�j�oX�|�d�j�o'�|��i�|�ƒ�d�j�o�|��i�i�ƒ��q”|��i�i�|�|�ƒ�|��i�i�ƒ��nT|�t�i �j�o�|��i�i!�ƒ��n3|�t�i"�t�i#�f�j�oq�|�|��i �j��o]�|��i�i�|�d�|�ƒ�|�|��i�|�d�ƒ�j�o(�|��i�i�|�d�|��i�|�d�ƒ�ƒ�qèq”n©�|�t�i$�j�o�|��i�i%�ƒ��nˆ�|�t�i&�t�i'�f�j�on�|�d�j�o]�|��i�i�|�d�|�ƒ�|�|��i�|�d�ƒ�j�o(�|��i�i�|�d�|��i�|�d�ƒ�ƒ�qq”n�d�S(���s!���Process a single editing command.i����i���N((���R���R����t���getyxR���t���xt���chR���R���t���isprintR���R���R ���R���t���errort���SOHt���movet���STXt���KEY_LEFTt���BSt ���KEY_BACKSPACER���R!���t���delcht���EOTt���ENQt���ACKt ���KEY_RIGHTt���BELt���NLt���VTt���deletelnt���clrtoeolt���FFt���refresht���SOt���KEY_DOWNt���SIt���insertlnt���DLEt���KEY_UP(���R���R$���R���R#���(����(����R���t ���do_command?���sx����� % ( #0 0c���������C���sè���d�}�xÛ�t�|��i�d�ƒ�D]Æ�}�|��i�i�|�d�ƒ�|��i�|�ƒ�}�|�d�j�o�|��i �o�q�n�x_�t�|��i �d�ƒ�D]J�}�|��i �o�|�|�j�o�Pn�|�t�t �i �|��i�i�|�|�ƒ�ƒ�ƒ�}�qt�W|��i�d�j�o�|�d�}�q�q�W|�S(���s.���Collect and return the contents of the window.t����i���i����s��� N(���t���resultt���rangeR���R���R���R����R(���R!���t���stopR���R���R#���t���chrR���R���(���R���RC���RA���R���R#���(����(����R���t���gather…���s �������,c���������C���sh���x[�|��i�i�ƒ��}�|�o�|�|�ƒ�}�n�|�p�q�n�|��i�|�ƒ�p�Pn�|��i�i�ƒ��q�W|��i�ƒ��S(���s2���Edit in the widget window and collect the results.i���N(���R���R����t���getchR$���t���validateR?���R8���RE���(���R���RG���R$���(����(����R���t���edit•���s�������( ���t���__name__t ���__module__t���__doc__R���R!���R?���RE���R���RH���(����(����(����R���R������s���� F t���__main__c���������C���s‡���d�\�}�}�d �\�}�}�|��i�|�d�|�d�ƒ�t�i�|�|�|�|�ƒ�}�t �|��|�d�|�d�|�|�|�|�ƒ�|��i �ƒ��t�|�ƒ�i�ƒ��S( ���Ni ���i���i���i���i���s���Use Ctrl-G to end editing.i���(���i ���i���(���i���i���( ���t���ncolst���nlinesR���R���t���stdscrt���addstrR���t���newwinR����R���R8���R���RH���(���RO���R���R���RM���R����RN���(����(����R���t���test_editbox£���s����& s���Contents of text box:( ���RK���R���R���R���R���RI���RR���t���wrappert���strt���repr(���R���RR���RT���R���R���R���(����(����R���t���?���s���