Your IP : 18.225.54.199


Current Path : /opt/alt/python35/lib64/python3.5/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/idlelib/__pycache__/RstripExtension.cpython-35.pyc



��Yf�@sNdZGdd�d�ZedkrJddlZejdddd	d
�dS)z=Provides "Strip trailing whitespace" under the "Format" menu.c@s@eZdZddd	gfgZdd�Zddd�ZdS)
�RstripExtension�formatN�Strip trailing whitespace�
<<do-rstrip>>cCs&||_|jjjd|j�dS)Nz
<<do-rstrip>>)�editwin�textZbind�	do_rstrip)�selfr�r	�</opt/alt/python35/lib64/python3.5/idlelib/RstripExtension.py�__init__s	zRstripExtension.__init__c	Cs�|jj}|jj}|j�tt|jd���}xytd|�D]h}|jd|d|�}t	|�}t	|j
��}||krM|jd||fd|�qMW|j�dS)N�end�z%i.0z%i.endz%i.%i)
rr�undoZundo_block_start�int�float�index�range�get�len�rstripZdeleteZundo_block_stop)	rZeventrrZend_lineZcurZtxt�rawZcutr	r	r
rs
"zRstripExtension.do_rstrip)rr)�__name__�
__module__�__qualname__Zmenudefsrrr	r	r	r
rsr�__main__�Nzidlelib.idle_test.test_rstrip�	verbosity��exitF)�__doc__rrZunittest�mainr	r	r	r
�<module>s

?>