Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.10/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.10/idlelib/__pycache__/autocomplete.cpython-310.pyc
o

�9j�$�@sdZddlZddlZddlZddlZddlZdd�ejD�Ze�d�e�	�d\Z
Zddlm
Z
ddlmZdd	lmZd
ZdZddde
fZdddefZejejd
Zej�ejr^ejnd��Zde��ZGdd�d�Ze��edkr�ddl m!Z!e!ddd�dSdS)z�Complete either attribute names or file names.

Either on demand or after a user-selected delay after a key character,
pop up a list of candidates.
�NcCsg|]}|dvr|�qS)>�None�True�False���.0�srr�+/usr/lib/python3.10/idlelib/autocomplete.py�
<listcomp>
s�r
)�match�case)r�)�autocomplete_w)�idleConf)�HyperParser)TFTN)FTTNF�_��.c@sneZdZddd�Zedd��Zdd�Zddd	�Zd
d�Zdd
�Z	ddd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�AutoCompleteNcCs2||_|dur|j|_||_d|_d|_d|_dS�N)�editwin�text�tags�autocompletewindow�_delayed_completion_id�_delayed_completion_index)�selfrrrrr	�__init__(s
zAutoComplete.__init__cCstjdddddd�|_dS)N�
extensionsr�	popupwait�intr)�type�default)r�	GetOptionr)�clsrrr	�reload4s
�zAutoComplete.reloadcCstj|j|jd�S)N)r)r�AutoCompleteWindowrr)rrrr	�_make_autocomplete_window9sz&AutoComplete._make_autocomplete_windowcCs|jr
|j��d|_dSdSr)r�hide_window�r�eventrrr	�_remove_autocomplete_window<s

�z(AutoComplete._remove_autocomplete_windowcCs|�t�dS)zA(^space) Open completion list, even if a function call is needed.�break)�open_completions�FORCEr)rrr	�force_open_completions_eventAs
z)AutoComplete.force_open_completions_eventcCsZt|d�r|js|j�dd���sdS|jr"|j��r"|j��dS|�t	�}|r+dSdS)z5(tab) Complete word or open list if multiple options.�mc_state�insert linestart�insertNr,)
�hasattrr0r�get�stripr�	is_active�completer-�TAB)rr*�openedrrr	�autocomplete_eventFs�

zAutoComplete.autocomplete_eventcCsh|j�d�}|tvr2|dkrtnt}|j�d�|_|jdur%|j�|j�|j�	|j
|j|�|_dSdS)z7(./) Open completion list after pause with no movement.z	insert-1crr2N)rr4�TRIGGERS�TRY_A�TRY_F�indexrr�after_cancel�afterr�_delayed_open_completions)rr*�lastchar�argsrrr	�try_open_completions_eventTs


��z'AutoComplete.try_open_completions_eventcCs*d|_|j�d�|jkr|�|�dSdS)z)Call open_completions if index unchanged.Nr2)rrr>rr-)rrCrrr	rA_s�z&AutoComplete._delayed_open_completionsc
Cs&|\}}}}|jdur|j�|j�d|_t|jd�}|j�dd�}t|�}}	|��r{|r2|tkr{|�	�t}|rT||ddt
vrT|d8}|rT||ddt
vsD|||	�}
|}	|rt||ddvrt|d8}|rt||ddvsf|||	�}np|��r�|r�|tkr�|�	�t}|r�||dt
vs�t||d�dkr�|d8}|r�||dt
vs�t||d�dks�|||	�}
|r�||ddkr�|�dt|�|d�|��}|r�|s�|�d	�d
kr�dSnd}ndS|r�|s�|
s�dS|�||�}|ds�dS|��|_|j�|dt|
�|||�S)
aXFind the completions and create the AutoCompleteWindow.
        Return True if successful (no syntax error or so found).
        If complete is True, then if there's nothing to complete and no
        start of completion, won't open completions and return False.
        If mode is given, will open a completion list only in this mode.
        Nr2r1r
z'"�rz
insert-%dc�(���rr)rrr?rrr4�len�is_in_string�FILESr+�SEPS�
is_in_code�ATTRS�ID_CHARS�ord�	set_index�get_expression�find�fetch_completionsr'r�show_window)
rrC�	evalfuncsr7�wantwin�mode�hp�curline�i�j�
comp_start�	comp_what�
comp_listsrrr	r-es^
��((���
�zAutoComplete.open_completionsc	Csbz	|jjjjj}Wnd}Y|r|�dd||fi�S|tkry|dkrOitjj	�tj	�}t
d|�}|�t�|�
�d|vrGtt
d|��}nbdd�|D�}nZz |�|�}t|�}|�
�d|vrgt|j�}nd	d�|D�}Wn9ggfYS|tkr�|dkr�d
}ztj�|�}t�|�}|�
�dd�|D�}Wn
ty�ggfYSw|s�|}||fS)aOReturn a pair of lists of completions for something. The first list
        is a sublist of the second. Both are sorted.

        If there is a Python subprocess, get the comp. list there.  Otherwise,
        either fetch_completions() 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.
        N�exec�get_the_completion_listrzdir()�__all__cS� g|]}|dd�dkr|�qS�Nr
rrrrrr	r
�� z2AutoComplete.fetch_completions.<locals>.<listcomp>cSrbrcrrrrr	r
�rdrcSrb)Nr
rrrrrr	r
�rd)r�flist�pyshell�interp�rpcclt�
remotecallrM�__main__�__builtins__�__dict__�eval�extend�completion_kwds�sort�sorted�
get_entity�dirrarJ�os�path�
expanduser�listdir�OSError)	r�whatrWrh�	namespace�bigl�smalll�entity�expandedpathrrr	rS�sV�
�


�
�zAutoComplete.fetch_completionscCst|itj�tj��S)zBLookup name in a namespace spanning sys.modules and __main.dict__.)rm�sys�modulesrjrl)r�namerrr	rr�szAutoComplete.get_entity)NNr)�__name__�
__module__�__qualname__r�classmethodr%r'r+r/r:rDrAr-rSrrrrrr	r&s



<:rrj)�mainz#idlelib.idle_test.test_autocomplete�)�	verbosity)"�__doc__rj�keywordrt�stringr�kwlistrornrprMrJ�idlelibr�idlelib.configr�idlelib.hyperparserrr.r8r<r=�
ascii_letters�digitsrN�sep�altseprKr;rr%r��unittestr�rrrr	�<module>s6

;�

Youez - 2016 - github.com/yon3zu
LinuXploit