Viewing File: /opt/alt/python35/lib64/python3.5/idlelib/__pycache__/CallTips.cpython-35.opt-2.pyc



й¼],ã@sêddlZddlZddlZddlZddlZddlZddlmZddlm	Z	Gdd„dƒZ
dd„ZdZd	Z
dZejdƒZd
Zdd„ZedkræddlmZedddƒdS)éN)Ú
CallTipWindow)ÚHyperParserc@s”eZdZddgfgZddd„Zdd„Zd	d
„Zddd„Zd
d„Zdd„Z	dd„Z
dd„Zdd„ZdS)ÚCallTipsZeditú
Show call tipú<<force-open-calltip>>NcCsF|dkrd|_n*||_|j|_d|_|j|_dS)N)ÚeditwinÚtextÚactive_calltipÚ_make_tk_calltip_windowÚ_calltip_window)Úselfr©r
ú-/opt/alt/python35/lib64/python3.5/CallTips.pyÚ__init__s		zCallTips.__init__cCs
d|_dS)N)r)rr
r
rÚclose#szCallTips.closecCstj|jƒS)N)rZCallTipr)rr
r
rr
&sz CallTips._make_tk_calltip_windowcCs#|jr|jjƒd|_dS)N)r	Zhidetip)rÚeventr
r
rÚ_remove_calltip_window*s	
zCallTips._remove_calltip_windowcCs|jdƒdS)NT)Úopen_calltip)rrr
r
rÚforce_open_calltip_event/sz!CallTips.force_open_calltip_eventcCs|jdƒdS)NF)r)rrr
r
rÚtry_open_calltip_event3szCallTips.try_open_calltip_eventcCs)|jr%|jjƒr%|jdƒdS)NF)r	Z	is_activer)rrr
r
rÚrefresh_calltip_event:szCallTips.refresh_calltip_eventcCsÆ|jƒt|jdƒ}|jdƒ}|s5dS|j|dƒ|jƒ}|s\dS|r||jdƒdkr|dS|j|ƒ}|s•dS|jƒ|_	|j	j
||d|dƒdS)NÚinsertú(rééÿÿÿÿ)rrrZget_surrounding_bracketsZ	set_indexZget_expressionÚfindÚ	fetch_tiprr	Zshowtip)rZ	evalfuncsZhpZ	sur_parenÚ
expressionÚargspecr
r
rr>s 
zCallTips.open_calltipc
Csgy|jjjjj}Wntk
r3d}YnX|rS|jdd|fiƒStt|ƒƒSdS)NÚexecZget_the_calltip)	rÚflistZpyshellZinterpÚrpccltÚAttributeErrorZ
remotecallÚget_argspecÚ
get_entity)rrr!r
r
rrQs

zCallTips.fetch_tip)rr)
Ú__name__Ú
__module__Ú__qualname__Zmenudefsrrr
rrrrrrr
r
r
rrs	rcCsS|rOtjjƒ}|jtjƒyt||ƒSWntk
rNdSYnXdS)N)ÚsysÚmodulesÚcopyÚupdateÚ__main__Ú__dict__ÚevalÚ
BaseException)rÚ	namespacer
r
rr$is
r$éUéú éz(?<=\()\w*\,?\s*zSee source or docc
CsÜd}y
|j}Wntk
r+|SYnXt|tƒrG|j}n!t|tjƒrb|}n|}t|tjtjfƒr×tj	tj
|ƒŒ}t|ttjfƒsÅt|tjƒr×tjd|ƒ}t
|ƒtkrtj|tdtƒn|r|gng}t|tjƒr4|j}nt|ddƒ}|rÌxn|jdtƒdt…D]P}|jƒ}|s‚Pt
|ƒtkr¬|dtd…d}|j|ƒqiWdj|ƒ}|sØt}|S)NÚÚsubsequent_indentÚ__doc__Ú
éz...)Ú__call__r/Ú
isinstanceÚtyperÚtypesÚ
MethodTypeÚFunctionTypeÚinspectZ
formatargspecZgetfullargspecÚ_first_paramÚsubÚlenÚ	_MAX_COLSÚtextwrapÚwrapÚ_INDENTr7ÚgetattrÚsplitÚ
_MAX_LINESÚstripÚappendÚjoinÚ_default_callable_argspec)ÚobrZob_callZfobÚlinesÚdocÚliner
r
rr#s>	

		?#r#r,)Úmainzidlelib.idle_test.test_calltipsÚ	verbosityéz    )r,r@Úrer(rEr=ZidlelibrZidlelib.HyperParserrrr$rDrJrGÚcompilerArNr#r%ZunittestrSr
r
r
rÚ<module>s$W.
Back to Directory File Manager