Mini Shell
3
��\� � @ s d dl mZ d dlmZmZmZmZ d dlmZm Z m
Z
mZ d dlZd dl
Zd dlmZmZ d dlZd dlZejjdkr~eZneZd dlZdd� ZG d d
� d
e�ZG dd� de�ZG d
d� de�ZG dd� dee �ZG dd� dee
�ZG dd� dee�ZG dd� de�Z dS )� )�print_function)�MAIN_RESPONSE_DEBUG�MAIN_RESPONSE_SAVE�MAIN_RESPONSE_SHELL�MAIN_RESPONSE_QUIT)�AbstractIntf�AbstractSaveExceptionWindow�AbstractMainExceptionWindow�AbstractMessageWindowN)�LIBREPORT_WAIT�LIBREPORT_RUN_CLI� c C s | dkrt jddd�j | �S dS )N� z
python-mehT)Zfallback)�gettextZtranslation)�x� r �/usr/lib/python3.6/text.py�<lambda>$ s r c @ s0 e Zd ZdZeefdd�Zd
dd�Zdd� Zd S )� IOHandlerz�
Class that provides methods for input and output. Its instance is expected
to be passed to objects performing some I/O operations.
c C s || _ || _dS )a\
Constructor for the IOhandler class. Arguments can be used to override
default I/O functions with the custom ones.
:param in_func: input function similar to standard raw_input
:type in_func: str -> str
:param out_func: output function similar to standard print
:type out_func: str -> None
N)�in_func�out_func)�selfr r r r r �__init__. s zIOHandler.__init__r c C s | j |� d S )N)r )r �msgr r r �print= s zIOHandler.printc C s
| j |�S )N)r )r �promptr r r � raw_input@ s zIOHandler.raw_inputN)r )�__name__�
__module__�__qualname__�__doc__�raw_input_fnr r r r r r r r '