Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/idlelib/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/idlelib/__pycache__/calltip.cpython-39.opt-2.pyc

a

��gc�@s�ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	Gdd�d�Z
dd�ZdZd	Z
d
Ze�d�ZdZd
Zdd�Zedkr�ddlmZeddd�dS)�N)�	calltip_w)�HyperParserc@sXeZdZddd�Zdd�Zdd�Zddd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)�CalltipNcCs0|durd|_n||_|j|_d|_|j|_dS�N)�editwin�text�active_calltip�_make_tk_calltip_window�_calltip_window)�selfr�r�+/usr/local/lib/python3.9/idlelib/calltip.py�__init__szCalltip.__init__cCs
d|_dSr)r
�rrrr
�closesz
Calltip.closecCst�|j�Sr)rZ
CalltipWindowrrrrr
r	 szCalltip._make_tk_calltip_windowcCs|jr|j��d|_dSr)rZhidetip�r�eventrrr
�remove_calltip_window$s
zCalltip.remove_calltip_windowcCs|�d�dS)NT�break��open_calltiprrrr
�force_open_calltip_event)s
z Calltip.force_open_calltip_eventcCs|�d�dS�NFrrrrr
�try_open_calltip_event.szCalltip.try_open_calltip_eventcCs|jr|jjr|�d�dSr)rZ	tipwindowrrrrr
�refresh_calltip_event5szCalltip.refresh_calltip_eventcCs�t|jd�}|�d�}|s&|��dS|jr`tt|d�d��\}}||f|jj|jj	fkr`dS|�
|d�z|��}Wnty�d}Yn0|s�dS|��|s�|�
d�dkr�dS|�|�}|s�dS|��|_|j�||d|d�dS)N�insert�(r�.����)rrZget_surrounding_bracketsrr�map�int�splitZ	parenlineZparencolZ	set_indexZget_expression�
ValueError�find�	fetch_tipr
Zshowtip)rZ	evalfuncsZhpZ	sur_parenZopener_lineZ
opener_col�
expression�argspecrrr
r9s6
��


zCalltip.open_calltipcCsPz|jjjjj}Wnty(d}Yn0|r@|�dd|fi�Stt|��SdS)N�execZget_the_calltip)	r�flistZpyshellZinterp�rpcclt�AttributeErrorZ
remotecall�get_argspec�
get_entity)rr&r*rrr
r%ls
�zCalltip.fetch_tip)N)N)�__name__�
__module__�__qualname__rrr	rrrrrr%rrrr
rs
	
3rcCs:|r6itj�tj�}zt||�WSty4YdS0dSr)�sys�modules�__main__�__dict__�eval�
BaseException)r&�	namespacerrr
r-�sr-�U�z    z(?<=\()\w*\,?\s*zSee source or doczinvalid method signaturec	
CsPz
|j}WntyYdS0t|tj�r0|n|}ztt�|��}WnJty�}z2t|�}|�	t
�rxt
WYd}~Sd}WYd}~n
d}~00t|t�r�|dkr�t}t
|�tkr�tj|ttd�n|r�|gng}t�|�}|�r<|�dt�dt�D]D}|��}|�s�q<t
|�tk�r0|dtd�d}|�|�q�d�|�}|�pNtS)N�z())�subsequent_indent�
�z...)�__call__r6�
isinstance�types�
MethodType�str�inspectZ	signature�	Exception�
startswith�_invalid_method�type�_default_callable_argspec�len�	_MAX_COLS�textwrap�wrap�_INDENTZgetdocr"�
_MAX_LINES�strip�append�join)	�obZob_callZfobr'�err�msg�lines�doc�linerrr
r,�s:



��

r,r3)�mainzidlelib.idle_test.test_calltip�)�	verbosity)r3rC�rer1rKr@ZidlelibrZidlelib.hyperparserrrr-rJrNrM�compileZ_first_paramrHrFr,r.ZunittestrXrrrr
�<module>s&s
1

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists