3 .�]! � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZyddlm Z m Z W n$ ek rt ddl m Z m Z Y nX ddlm Z mZ ddlmZ ddlmZ G dd � d e �ZdS ) zJProvides an interface like pexpect.spawn interface using subprocess.Popen � N)�Queue�Empty� )� SpawnBase�PY3)�EOF)�string_typesc s� e Zd Zerdjd�ZndZd� fdd� Zd Zd d� Zdd � Z dd� Z dd� Zdd� Zddd�Z dd� Zdd� Zdd� Z� ZS )� PopenSpawn� �ascii� �� N�strictc s� t t| �j|||||| d� tdtjtjtj||d�} tjdkrjtj � }| j tjO _ || d<