Mini Shell
B
� k��l�� @ s� d Z ddlZddlZddlZddlZd\ZZddlmZ ddl m
Z
ddlmZ dZ
dZd d d efZd d d efZejej d
Zej� ejr�ejnd� �Zde� �ZG d
d� d�Ze�� edkr�ddlmZ eddd� dS )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.
� N)r � )�autocomplete_w)�idleConf)�HyperParser)TFTN)FTTNF�_� �.c @ sn e Zd Zddd�Zedd� �Zdd� Zddd �Zd
d� Zdd
� Z ddd�Z
dd� Zdd� Zdd� Z
dd� ZdS )�AutoCompleteNc C s, || _ |d k r|j| _d | _d | _d | _d S )N)�editwin�text�autocompletewindow�_delayed_completion_id�_delayed_completion_index)�selfr
� r �9/opt/alt/python37/lib64/python3.7/idlelib/autocomplete.py�__init__! s zAutoComplete.__init__c C s t jdddddd�| _d S )N�
extensionsr � popupwait�intr )�type�default)r Z GetOptionr )�clsr r r �reload, s zAutoComplete.reloadc C s t �| j�S )N)r ZAutoCompleteWindowr )r r r r �_make_autocomplete_window1 s z&AutoComplete._make_autocomplete_windowc C s | j r| j �� d | _ d S )N)r Zhide_window)r �eventr r r �_remove_autocomplete_window4 s
z(AutoComplete._remove_autocomplete_windowc C s | � t� dS )zA(^space) Open completion list, even if a function call is needed.�break)�open_completions�FORCE)r r r r r �force_open_completions_event9 s
z)AutoComplete.force_open_completions_eventc C s^ t |d�r|js"| j�dd��� s&dS | jrD| j�� rD| j�� dS | �t �}|rVdS dS dS )z5(tab) Complete word or open list if multiple options.�mc_statezinsert linestart�insertNr )
�hasattrr! r �get�stripr Z is_active�completer �TAB)r r Zopenedr r r �autocomplete_event>