Your IP : 3.15.12.133
3
� f: � @ sh d dl mZ d dlmZ G dd� d�Zdd� Zedkrdd dlmZ ed d
dd� d d
l m
Z
e
e� dS )� )� Delegator)�WidgetRedirectorc @ s@ e Zd Zdd� Zdd� Zddd�Zddd �Zd
d� Zdd
� ZdS )�
Percolatorc C sR || _ t|�| _t|� | _| _| jjd| j�| j_| jjd| j�| j_g | _ d S )N�insert�delete)
�textr �redirr �top�bottom�registerr r �filters)�selfr � r �7/opt/alt/python36/lib64/python3.6/idlelib/percolator.py�__init__ s
zPercolator.__init__c C sP x| j | jk r| j| j � qW d | _ | jjd � d | _| jj� d | _d | _d S )N)r r
�removefilter�setdelegater �closer )r
r r r r s
zPercolator.closeNc C s | j j|||� d S )N)r r )r
�index�charsZtagsr r r r s zPercolator.insertc C s | j j||� d S )N)r r )r
Zindex1Zindex2r r r r s zPercolator.deletec C s2 t |t�st�|jd kst�|j| j� || _d S )N)�
isinstancer �AssertionError�delegater r )r
�filterr r r �insertfilter"