| 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 : |
o
�9jiR � @ s� d Z ddlZddlT ddlmZ ddlmZmZ ddlm Z dZ
dZed fZd
Z
dZdZd
ZdZdZdZG dd� d�ZedkrNddlmZ edddd� dS dS )zH
An auto-completion window for IDLE, used by the autocomplete extension
� N)�*)� Scrollbar)�FILES�ATTRS)�MC_SHIFTz<<autocompletewindow-hide>>z
<FocusOut>z
<ButtonPress>z<<autocompletewindow-keypress>>)z<Key>z<Key-BackSpace>z<Key-Return>z <Key-Tab>z<Key-Up>z
<Key-Down>z
<Key-Home>z <Key-End>z<Key-Prior>z
<Key-Next>z<Key-Escape>z!<<autocompletewindow-keyrelease>>z<KeyRelease>z<B1-ButtonRelease>z<Configure>z<B1-Double-ButtonRelease>c @ s� e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� Zdd� Zd
d� Z dd� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd � Zd!S )"�AutoCompleteWindowc C s� || _ || _d | _ | _| _d | _| _d | _d | _d | _ d | _
d | _d | _d | _
d | _ | _ | _ | _ | _| _d| _d| _d S )NF)�widget�tags�autocompletewindow�listbox� scrollbar�origselforeground�origselbackground�completions�morecompletions�mode�start�
startindex�lasttypedstart�userwantswindow�hideid�
keypressid�listupdateid�winconfigid�keyreleaseid�
doubleclickid�lastkey_was_tab�is_configuring)�selfr r � r �-/usr/lib/python3.10/idlelib/autocomplete_w.py�__init__ s$ ��
zAutoCompleteWindow.__init__c C s� t t| j�t|��}d}||k r*| j| || kr*|d7 }||k r*| j| || ks|t| j�k rE| j�d| j|f d| jt| j�f � |t|�k r]| j�d| j|f ||d � | j� || _d S )Nr � �%s+%dc)�min�lenr r �deleter �insertr )r �newstart�min_len�ir r r �
_change_start@ s ��
�
z AutoCompleteWindow._change_startc C sZ d}t | j�}||kr#|| d }| j| |kr|}n|d }||kst|t | j�d �S )z�Find the first index in self.completions where completions[i] is
greater or equal to s, or the last index if there is no such.
r � r"