Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure you want to rename?
File Manager
/
ALFA_DATA
/
alfasymlink
/
root
/
lib
/
python2.7
/
site-packages
/
pexpect
:
fdpexpect.pyc
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
� �ڛac @ sq d Z d d l m Z d d l m Z m Z d d l m Z m Z d d l Z d g Z d e f d � � YZ d S( sz This is like pexpect, but it will work with any file descriptor that you pass it. You are responsible for opening and close the file descriptor. This allows you to use Pexpect with sockets and named pipes (FIFOs). PEXPECT LICENSE This license is approved by the OSI and FSF as GPL-compatible. http://opensource.org/licenses/isc-license.txt Copyright (c) 2012, Noah Spurrier <noah@noah.org> PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY PURPOSE WITH OR WITHOUT FEE IS HEREBY GRANTED, PROVIDED THAT THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE APPEAR IN ALL COPIES. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. i ( t SpawnBase( t ExceptionPexpectt TIMEOUT( t select_ignore_interruptst poll_ignore_interruptsi����Nt fdspawnc B s� e Z d Z d d d d d d d e d � Z d � Z d � Z e d � Z d � Z d � Z d � Z d � Z d d d � Z RS( s� This is like pexpect.spawn but allows you to supply your own open file descriptor. For example, you could use it to read through a file looking for patterns, or to control a modem or serial device. i i� t strictc C s� t | � t d � k r6 t | d � r6 | j � } n t | � t d � k r] t d � � n y t j | � Wn t k r� t d � � n Xd | _ d | _ t j | | | | | d | d | �| | _ t | _ t | _ d | | _ | | _ d S( s� This takes a file descriptor (an int) or an object that support the fileno() method (returning an int). All Python file-like objects support fileno(). i t filenosd The fd argument is not an int. If this is a command string then maybe you want to use pexpect.spawn.s/ The fd argument is not a valid file descriptor.t encodingt codec_errorss <file descriptor %d>N( t typet hasattrR R t ost fstatt OSErrort Nonet argst commandR t __init__t child_fdt Falset own_fdt closedt namet use_poll( t selft fdR t timeoutt maxreadt searchwindowsizet logfileR R R ( ( s4 /tmp/pip-install-ztITAX/pexpect/pexpect/fdpexpect.pyR $ s"