B
    u9aÚ  ã               @   s<   d dl Z d dl mZ d	dd„Zdd„ Zedkr8e  e¡ dS )
é    N)ÚtextpadFc             C   s
  d\}}d\}}|rd}nd}|   |d |d| ¡ |   |d |d¡ t ||||¡}t | |d	 |d	 || || ¡ |  ¡  t ||¡}| ¡ }	|   || d d
d¡ |   t|	ƒ¡ |   d¡ |   d¡ |  	¡  x0t
dƒD ]$}
|  || d |
 d
¡ |  ¡  qÞW d S )N)é   é   )r   é   zinsert modezoverwrite moder   zUse Ctrl-G to end editing (%s).r   z0Be sure to try typing in the lower-right corner.é   r   zText entered in the box
Ú
zPress any key)ZaddstrÚcursesZnewwinr   Z	rectangleZrefreshZTextboxZeditÚreprZgetchÚrangeZmoveZclrtoeol)ÚstdscrZinsert_modeZncolsZnlinesZulyZulxÚmodeÚwinZboxÚcontentsÚi© r   ú"/usr/lib/python3.7/curses_tests.pyÚtest_textpad   s(    "

r   c             C   s    |   ¡  t| dƒ t| dƒ d S )NFT)Úclearr   )r   r   r   r   Úmain'   s    
r   Ú__main__)F)r   r   r   r   Ú__name__Úwrapperr   r   r   r   Ú<module>
   s
   
