ok
Direktori : /proc/thread-self/root/opt/alt/python36/lib64/python3.6/idlelib/__pycache__/ |
Current File : //proc/thread-self/root/opt/alt/python36/lib64/python3.6/idlelib/__pycache__/iomenu.cpython-36.pyc |
3 � f�P � @ s d dl Z d dl mZ d dlZd dlZd dlZd dlZd dlZd dljZ d dl jZd dl mZ d dlZd dlmZ ejr~dZ�n yd dlZejejd� W n eejfk r� Y nX dZejdkr�yej� d Ze je� W n ek r� Y nX n�y2ejej �Zedk�sedk�rdZe je� W nj e!e"efk �r� y2ej� d Zedk�s`edk�rddZe je� W n e#efk �r� Y nX Y nX ej$� ZeZej%d ej&�Z'ej%dej&�Z(dd � Z)G dd� d�Z*dd� Z+e,dk�rd dl-m.Z. e.dddd� d dl/m0Z0 e0e+� dS )� N)�BOM_UTF8)� askstring)�idleConfzutf-8� �asciiZwin32� z&^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)z^[ \t\f]*(?:[#\r\n]|$)c C s� t | t�r| jd�}n| }d|kr8|jdd�dd� }n$d|krV|jdd�dd� }n|g}x2|D ]&}tj|�}|dk rzP tj|�sbdS qbW dS |jd�}ytj |� W n t k r� t d| ��Y nX |S )aV Return the encoding declaration according to PEP 263. When checking encoded data, only the first two lines should be passed in to avoid a UnicodeDecodeError if the rest of the data is not unicode. The first two lines would contain the encoding specification. Raise a LookupError if the encoding is declared but unknown. z iso-8859-1� � N� r zUnknown encoding: )� isinstance�bytes�decode�split� coding_re�match�blank_re�group�codecs�lookup�LookupError)�data�linesZlst�liner �name� r �3/opt/alt/python36/lib64/python3.6/idlelib/iomenu.py�coding_specG s* r c @ s� e Zd Zdd� Zdd� Zdd� Zdd� Zd d � ZdZdd � Z dZ dZdd� Zd:dd�Z dZeje�ZejZdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� ZdZdZ d>Z!e"j#d.kr�d/nd0Z$d1d2� Z%d?d4d5�Z&d6d7� Z'd8d9� Z(dS )@� IOBindingc C sr || _ |j| _| jjd| j�| _| jjd| j�| _| jjd| j�| _| jjd| j �| _ d | _| jjd| j�| _ d S )Nz<<open-window-from-file>>z<<save-window>>z<<save-window-as-file>>z<<save-copy-of-window-as-file>>z<<print-window>>)�editwin�text�bind�open�_IOBinding__id_open�save�_IOBinding__id_save�save_as�_IOBinding__id_saveas�save_a_copy�_IOBinding__id_savecopy�fileencoding�print_window�_IOBinding__id_print)�selfr r r r �__init__u s zIOBinding.__init__c C sf | j jd| j� | j jd| j� | j jd| j� | j jd| j� | j jd| j� d | _d | _ d | _d S )Nz<<open-window-from-file>>z<<save-window>>z<<save-window-as-file>>z<<save-copy-of-window-as-file>>z<<print-window>>) r Zunbindr"