File "CallTips.cpython-34.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python34/lib64/python3.4/idlelib/__pycache__/CallTips.cpython-34.pyc
File size: 5.81 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


e f,@sdZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
GdddZddZd	Z
d
ZdZejd
ZdZddZedkrddlmZedddndS)aCallTips.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.

N)
CallTipWindow)HyperParserc@seZdZddgfgZdddZddZd	d
ZdddZd
dZddZ	ddZ
ddZddZdS)CallTipsZedit
Show call tip<<force-open-calltip>>NcCsF|dkrd|_n*||_|j|_d|_|j|_dS)N)editwintextactive_calltip_make_tk_calltip_window_calltip_window)selfrr
5/opt/alt/python34/lib64/python3.4/idlelib/CallTips.py__init__s		zCallTips.__init__cCs
d|_dS)N)r)rr
r
rclose#szCallTips.closecCstj|jS)N)rZCallTipr)rr
r
rr
&sz CallTips._make_tk_calltip_windowcCs&|jr"|jjd|_ndS)N)r	Zhidetip)reventr
r
r_remove_calltip_window*s	
zCallTips._remove_calltip_windowcCs|jddS)z9The user selected the menu entry or hotkey, open the tip.TN)open_calltip)rrr
r
rforce_open_calltip_event/sz!CallTips.force_open_calltip_eventcCs|jddS)zHappens 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.
        FN)r)rrr
r
rtry_open_calltip_event3szCallTips.try_open_calltip_eventcCs,|jr(|jjr(|jdndS)NF)r	Z	is_activer)rrr
r
rrefresh_calltip_event:szCallTips.refresh_calltip_eventcCs|jt|jd}|jd}|s5dS|j|d|j}|s\dS|r||jddkr|dS|j|}|sdS|j|_	|j	j
||d|ddS)Ninsert(r)rrrZget_surrounding_bracketsZ	set_indexZget_expressionfind	fetch_tiprr	Zshowtip)rZ	evalfuncsZhpZ	sur_paren
expressionargspecr
r
rr>s 
zCallTips.open_calltipc
Csgy|jjjjj}Wntk
r3d}YnX|rS|jdd|fiStt|SdS)aDReturn 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.

        NexecZget_the_calltip)	rZflistZpyshellZinterprpccltAttributeErrorZ
remotecallget_argspec
get_entity)rrr r
r
rrQs

zCallTips.fetch_tip)rr)
__name__
__module____qualname__Zmenudefsrrr
rrrrrrr
r
r
rrs	rcCsV|rRtjj}|jtjyt||SWqRtk
rNdSYqRXndS)zwReturn the object corresponding to expression evaluated
    in a namespace spanning sys.modules and __main.dict__.
    N)sysmodulescopyupdate__main____dict__eval
BaseException)r	namespacer
r
rr#is
r#U z(?<=\()\w*\,?\s*zSee source or docc
Csd}y
|j}Wntk
r+|SYnXt|trG|j}n!t|tjrb|}n|}t|tjtjfrtj	tj
|}t|ttjfst|tjrtjd|}qnt
|tkrtj|tdtn|r|gng}t|tjr:|j}nt|dd}|rxt|jdtdtD]V}|j}|sPnt
|tkr|dtdd}n|j|qoWdj|}n|st}n|S)aReturn 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.
    Zsubsequent_indent__doc__
Nz...)__call__r.
isinstancetypertypes
MethodTypeFunctionTypeinspectZ
formatargspecZgetfullargspec_first_paramsublen	_MAX_COLStextwrapZwrap_INDENTr5getattrsplit
_MAX_LINESstripappendjoin_default_callable_argspec)obrZob_callZfoblinesdocliner
r
rr"s>	

		?#	r"r+)mainzidlelib.idle_test.test_calltips	verbosityz    )r5r+r>rer'rCr;ZidlelibrZidlelib.HyperParserrrr#rBrGrDcompiler?rKr"r$ZunittestrPr
r
r
r<module>s&W.