Ñò
§ÚêLc @ sO d Z d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k Z d d d „ ƒ YZ d „ Z
d „ Z e d j oà d
„ Z
d d „ Z d „ Z d
„ Z d „ Z d d „ Z d „ Z d e f d „ ƒ YZ d „ Z e ƒ Z e
e e e e e e e e i
e i e i e i e i e i e i f Z e e ƒ n d S( s CallTips.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.
iÿÿÿÿN( t
CallTipWindow( t HyperParsert CallTipsc B sz e Z d d
g f g Z d d „ Z d „ Z d „ Z d d „ Z d „ Z d „ Z d „ Z
d
„ Z d „ Z d „ Z
RS( t edits
Show call tips <>c C sI | d j o d | _ d S| | _ | i | _ d | _ | i | _ d S( N( t Nonet editwint textt calltipt _make_tk_calltip_windowt _make_calltip_window( t selfR ( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyt __init__ s
c C s
d | _ d S( N( R R ( R
( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyt close" s c C s t i | i ƒ S( N( R t CallTipR ( R
( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyR % s c C s( | i o | i i ƒ d | _ n d S( N( R t hidetipR ( R
t event( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyt _remove_calltip_window) s
c C s | i t ƒ d S( si Happens when the user really wants to open a CallTip, even if a
function call is needed.
N( t open_calltipt True( R
R ( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyt force_open_calltip_event. s c C s | i t ƒ d S( sª 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.
N( R t False( R
R ( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyt try_open_calltip_event4 s c C s/ | i o! | i i ƒ o | i t ƒ n d S( si If there is already a calltip window, check if it is still needed,
and if so, reload it.
N( R t is_activeR R ( R
R ( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyt refresh_calltip_event; s c C sË | i ƒ t | i d ƒ } | i d ƒ } | p d S| i | d ƒ | i ƒ } | p | o | i d ƒ d j o d S| i | ƒ } | p d S| i ƒ | _ | i i
| | d | d ƒ d S( Nt insertt (i iÿÿÿÿi ( R R R t get_surrounding_bracketst set_indext get_expressiont findt fetch_tipR R t showtip( R
t evalfuncst hpt sur_parent namet arg_text( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyR B s
&c C sg y | i i i i i } Wn
d } n X| o | i d d | f h ƒ S| i | ƒ } t | ƒ Sd S( sR Return the argument list and docstring of a function or class
If there is a Python subprocess, get the calltip there. Otherwise,
either fetch_tip() is running in the subprocess itself or it was called
in an IDLE EditorWindow before any script had been run.
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.
t exect get_the_calltipN( R t flistt pyshellt interpt rpccltR t
remotecallt
get_entityt get_arg_text( R
R# R* t entity( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyR S s
c C s\ | oQ t i i ƒ } | i t i ƒ y t | | ƒ SWqX t t f j
o d SXn d S( sA Lookup name in a namespace spanning sys.modules and __main.dict__N(
t syst modulest copyt updatet __main__t __dict__t evalt NameErrort AttributeErrorR ( R
R# t namespace( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyR, l s ( s
Show call tips <>N( t __name__t
__module__t menudefsR R R R R R R R R R R, ( ( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyR s c C sZ y | i i SWnE t j
o9 x4 | i D]$ } t | ƒ } | d j o | Sq) Wn Xd S( N( R t im_funcR7 t __bases__t _find_constructorR ( t class_obt baset rc( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyR> v s
c
C s* d } | d j od } t | ƒ t i t i f j o0 t | ƒ } | d j o
d „ } q— d } n0 t | ƒ t i j o | i } d } n | } t | ƒ t i t i g j oí | i
i } | i
i | | !} | i
p g } t t d „ | ƒ ƒ } d g t | ƒ t | ƒ | } t d „ | | ƒ } | i
i d @o | i d ƒ n | i
i d @o | i d
ƒ n d i | ƒ } d t i d
d | ƒ } n t | d d ƒ } | of | i ƒ } | i d ƒ } | d j p
| d j o
d } n | o | d 7} n | | | 7} q&n | S( s: Get a string describing the arguments for the given objectt i c S s d S( N( R ( ( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyt Š s i c S s d t | ƒ S( s =%s( t repr( R# ( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyRC ™ s c S s | | S( ( ( t argt dflt( ( s( /usr/lib64/python2.6/idlelib/CallTips.pyRC › s i s ...i s ***s , s (%s)s \.\d+s t __doc__s
iF N( R t typet typest ClassTypet TypeTypeR> t
MethodTypeR<