file_get_contents
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
lib64
/
python2.7
/
idlelib
/
Filename :
CallTips.pyo
back
Copy
� {fc�����������@���s����d��Z��d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�m�Z�d�d�l�m �Z �d�d�d�������YZ �d����Z�d�Z�d �Z �d�Z�d����Z�e�d �k�r��d�d�l�m�Z�e�d�d�d��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���<<force-open-calltip>>c���������C���sG���|�d��k�r�d��|��_�d��S|�|��_�|�j�|��_�d��|��_�|��j�|��_�d��S(���N(���t���Nonet���editwint���textt���calltipt���_make_tk_calltip_windowt���_make_calltip_window(���t���selfR���(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyt���__init__���s���� c���������C���s ���d��|��_�d��S(���N(���R���R ���(���R ���(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyt���close#���s����c���������C���s���t��j�|��j���S(���N(���R����t���CallTipR���(���R ���(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyR���&���s����c���������C���s&���|��j��r"�|��j��j����d��|��_��n��d��S(���N(���R���t���hidetipR���(���R ���t���event(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyt���_remove_calltip_window*���s���� c���������C���s���|��j��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.7/idlelib/CallTips.pyt���force_open_calltip_event/���s����c���������C���s���|��j��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.7/idlelib/CallTips.pyt���try_open_calltip_event5���s����c���������C���s,���|��j��r(�|��j��j����r(�|��j�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.7/idlelib/CallTips.pyt���refresh_calltip_event<���s����c���������C���s����|��j�����t�|��j�d���}�|�j�d���}�|�s5�d��S|�j�|�d���|�j����}�|�su�|�ry�|�j�d���d�k�ry�d��S|��j�|���}�|�s��d��S|��j����|��_ �|��j �j �|�|�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 ���expressiont���arg_text(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyR���C���s���� #c���������C���so���y�|��j��j�j�j�j�}�Wn�t�k �r2�d�}�n�X|�rR�|�j�d�d�|�f�i����S|��j�|���}�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���rpccltt���AttributeErrorR���t ���remotecallt ���get_entityt���get_arg_text(���R ���R#���R*���t���entity(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyR���T���s���� c���������C���sR���|�rN�t��j�j����}�|�j�t�j���y�t�|�|���SWqN�t�k �rJ�d�SXn��d�S(���s���Return the object corresponding to expression evaluated in a namespace spanning sys.modules and __main.dict__. N( ���t���syst���modulest���copyt���updatet���__main__t���__dict__t���evalt ���BaseExceptionR���(���R ���R#���t ���namespace(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyR-���m���s���� (���s ���Show call tips���<<force-open-calltip>>N(���t���__name__t ���__module__t���menudefsR���R���R���R���R���R���R���R���R���R���R-���(����(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyR������s��� c���������C���sV���y�|��j��j�SWnA�t�k �rQ�x1�|��j�D]"�}�t�|���}�|�d��k �r(�|�Sq(�Wn�Xd��S(���N(���R���t���im_funcR+���t ���__bases__t���_find_constructorR���(���t���class_obt���baset���rc(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyR>���{���s���� �iU���i���t��� i���c���������C���sT��d�}�y �|��j��}�Wn3�t�k �rH�t�|����t�j�k�rA�|��}�qI�|�Sn�Xd�}�t�|����t�j�t�j�f�k�r��t�|����}�|�d�k�r��d����}�q�d�}�nf�t�|����t�j�k�r��|��j �}�|��j �d�k �r�d�}�q�n-�t�|���t�j�k�r��|�j �}�d�}�n�|��}�t�|���t�j�t�j�g�k�r^|�j �j�}�|�j �j�|�|�!}�|�j�pIg��}�t�t�d����|�����}�d�g�t�|���t�|���|�}�t�d����|�|���}�x��d�d�f�D]��\�} �} �}�|�j �j�| �@r�| �|�}�|�|�k�r�|�j�|���q/d�} �x"�|�d �| �|�k�r| �d�7} �q�W|�j�|�d �| ���q�q�Wd�j�|���}�d�t�j�d�d�|���}�n��t�|���t�k�r�t�j�|�t�d�t��n�|�r�|�g�n�g��}�t�|�t�j���r�|�j�}�n�t�|��d�d���}�|�rPxh�|�j �d�t!���t!� D]P�}�|�j"����}�|�sPn��t�|���t�k�r-|�t�d� d�}�n��|�j�|���q�Wd�j�|���}�n��|�S(���s���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. t����i����c�����������S���s���d��S(���N(���R���(����(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyt���<lambda>����RC���i���c���������S���s���d�t��|����S(���Ns���=%s(���t���repr(���t���name(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyRD�������RC���c���������S���s���|��|�S(���N(����(���t���argt���dflt(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyRD�������RC���i���t���*t���argsi���s���**t���kwargss���%ss���, s���(%s)s���(?<!\d)\.\d+s���<tuple>t���subsequent_indentt���__doc__s��� i���s���...N(���i���RI���RJ���(���i���s���**RK���(#���t���__call__R7���t���typet���typest ���ClassTypet���TypeTypeR>���R���t ���MethodTypeR<���t���im_selft���FunctionTypet ���LambdaTypet ���func_codet���co_argcountt���co_varnamest ���func_defaultst���listt���mapt���lent���co_flagst���appendt���joint���ret���subt ���_MAX_COLSt���textwrapt���wrapt���_INDENTt ���isinstanceRM���t���getattrt���splitt ���_MAX_LINESt���strip(���t���obt���argspect���ob_callt ���arg_offsett���fobt���argcountt ���real_argst���defaultst���itemst���flagt���preRF���t���pre_namet���it���linest���doct���line(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyR.�������sj���� ! ?R4���(���t���mains���idlelib.idle_test.test_calltipst ���verbosityi���(����s��� (���RM���R4���Ra���R0���Rd���RP���t���idlelibR����t���idlelib.HyperParserR���R���R>���Rc���Rj���Rf���R.���R9���t���unittestR|���(����(����(����s(���/usr/lib64/python2.7/idlelib/CallTips.pyt���<module>���s ���i N