AlkantarClanX12

Your IP : 52.14.213.94


Current Path : /proc/self/root/opt/alt/python33/lib64/python3.3/idlelib/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python33/lib64/python3.3/idlelib/__pycache__/CallTips.cpython-33.pyo

�
��f,c@s�dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
Gdd�d�Zdd�Zd	Z
d
ZdZejd
�ZdZdd�Zedkr�ddlmZeddd�ndS(uCallTips.py - An IDLE Extension to Jog Your Memory

Call Tips are floating windows which display function, class, and method
parameter and docstring information when you type an opening parenthesis, and
which disappear when you type a closing parenthesis.

iN(u
CallTipWindow(uHyperParsercBs�|EeZdZddgfgZddd�Zdd�Zdd	�Zdd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS(uCallTipsueditu
Show call tipu<<force-open-calltip>>cCsF|dkrd|_n*||_|j|_d|_|j|_dS(N(uNoneueditwinutextuactive_calltipu_make_tk_calltip_windowu_calltip_window(uselfueditwin((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyu__init__s		uCallTips.__init__cCs
d|_dS(N(uNoneu_calltip_window(uself((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyuclose#suCallTips.closecCstj|j�S(N(u
CallTipWindowuCallTiputext(uself((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyu_make_tk_calltip_window&su CallTips._make_tk_calltip_windowcCs&|jr"|jj�d|_ndS(N(uactive_calltipuhidetipuNone(uselfuevent((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyu_remove_calltip_window*s	
uCallTips._remove_calltip_windowcCs|jd�dS(u9The user selected the menu entry or hotkey, open the tip.NT(uopen_calltipuTrue(uselfuevent((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyuforce_open_calltip_event/su!CallTips.force_open_calltip_eventcCs|jd�dS(u�Happens when it would be nice to open a CallTip, but not really
        necessary, for example after an opening bracket, so function calls
        won't be made.
        NF(uopen_calltipuFalse(uselfuevent((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyutry_open_calltip_event3suCallTips.try_open_calltip_eventcCs,|jr(|jj�r(|jd�ndS(NF(uactive_calltipu	is_activeuopen_calltipuFalse(uselfuevent((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyurefresh_calltip_event:suCallTips.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(Nuinsertu(iii����(u_remove_calltip_windowuHyperParserueditwinuget_surrounding_bracketsu	set_indexuget_expressionufindu	fetch_tipu_calltip_windowuactive_calltipushowtip(uselfu	evalfuncsuhpu	sur_parenu
expressionuargspec((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyuopen_calltip>s 
uCallTips.open_calltipc
Csgy|jjjjj}Wntk
r3d}YnX|rS|jdd|fi�Stt	|��SdS(uDReturn the argument list and docstring of a function or class.

        If there is a Python subprocess, get the calltip there.  Otherwise,
        either this fetch_tip() is running in the subprocess or it was
        called in an IDLE running without the subprocess.

        The subprocess environment is that of the most recently run script.  If
        two unrelated modules are being edited some calltips in the current
        module may be inoperative if the module was not the last to run.

        To find methods, fetch_tip must be fed a fully qualified name.

        uexecuget_the_calltipN(
ueditwinuflistupyshelluinterpurpccltuAttributeErroruNoneu
remotecalluget_argspecu
get_entity(uselfu
expressionurpcclt((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyu	fetch_tipQs

uCallTips.fetch_tipN(u
Show call tipu<<force-open-calltip>>(u__name__u
__module__u__qualname__umenudefsuNoneu__init__ucloseu_make_tk_calltip_windowu_remove_calltip_windowuforce_open_calltip_eventutry_open_calltip_eventurefresh_calltip_eventuopen_calltipu	fetch_tip(u
__locals__((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyuCallTipss	uCallTipscCsV|rRtjj�}|jtj�yt||�SWqRtk
rNdSYqRXndS(uwReturn the object corresponding to expression evaluated
    in a namespace spanning sys.modules and __main.dict__.
    N(	usysumodulesucopyuupdateu__main__u__dict__uevalu
BaseExceptionuNone(u
expressionu	namespace((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyu
get_entityis
u
get_entityiUiu iu(?<=\()\w*\,?\s*uSee source or doccCs�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|�}q�nt
|�tkrtj|tdt�n|r|gng}t|tj�r:|j}nt|dd�}|r�xt|jdt�dt�D]V}|j�}|s�Pnt
|�tkr�|dtd�d}n|j|�qoWdj|�}n|s�t}n|S(u�Return a string describing the signature of a callable object, or ''.

    For Python-coded functions and methods, the first line is introspected.
    Delete 'self' parameter for classes (.__init__) and bound methods.
    The next lines are the first lines of the doc string up to the first
    empty line or _MAX_LINES.    For builtins, this typically includes
    the arguments in addition to the return value.
    uusubsequent_indentu__doc__u
Niu...(u__call__u
BaseExceptionu
isinstanceutypeu__init__utypesu
MethodTypeuFunctionTypeuinspectu
formatargspecugetfullargspecu_first_paramusubulenu	_MAX_COLSutextwrapuwrapu_INDENTu__doc__ugetattrusplitu
_MAX_LINESustripuappendujoinu_default_callable_argspec(uobuargspecuob_callufobulinesudoculine((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyuget_argspecs>	

		?#	uget_argspecu__main__(umainuidlelib.idle_test.test_calltipsu	verbosityiu    (u__doc__u__main__uinspectureusysutextwraputypesuidlelibu
CallTipWindowuidlelib.HyperParseruHyperParseruCallTipsu
get_entityu	_MAX_COLSu
_MAX_LINESu_INDENTucompileu_first_paramu_default_callable_argspecuget_argspecu__name__uunittestumain(((u5/opt/alt/python33/lib64/python3.3/idlelib/CallTips.pyu<module>s&W.