(self, timeout=30, maxread=2000, searchwindowsize=None,
logfile=None, encoding=None, codec_errors='strict')
| 31 | flag_eof = False |
| 32 | |
| 33 | def __init__(self, timeout=30, maxread=2000, searchwindowsize=None, |
| 34 | logfile=None, encoding=None, codec_errors='strict'): |
| 35 | self.stdin = sys.stdin |
| 36 | self.stdout = sys.stdout |
| 37 | self.stderr = sys.stderr |
| 38 | |
| 39 | self.searcher = None |
| 40 | self.ignorecase = False |
| 41 | self.before = None |
| 42 | self.after = None |
| 43 | self.match = None |
| 44 | self.match_index = None |
| 45 | self.terminated = True |
| 46 | self.exitstatus = None |
| 47 | self.signalstatus = None |
| 48 | # status returned by os.waitpid |
| 49 | self.status = None |
| 50 | # the child file descriptor is initially closed |
| 51 | self.child_fd = -1 |
| 52 | self.timeout = timeout |
| 53 | self.delimiter = EOF |
| 54 | self.logfile = logfile |
| 55 | # input from child (read_nonblocking) |
| 56 | self.logfile_read = None |
| 57 | # output to send (send, sendline) |
| 58 | self.logfile_send = None |
| 59 | # max bytes to read at one time into buffer |
| 60 | self.maxread = maxread |
| 61 | # Data before searchwindowsize point is preserved, but not searched. |
| 62 | self.searchwindowsize = searchwindowsize |
| 63 | # Delay used before sending data to child. Time in seconds. |
| 64 | # Set this to None to skip the time.sleep() call completely. |
| 65 | self.delaybeforesend = 0.05 |
| 66 | # Used by close() to give kernel time to update process status. |
| 67 | # Time in seconds. |
| 68 | self.delayafterclose = 0.1 |
| 69 | # Used by terminate() to give kernel time to update process status. |
| 70 | # Time in seconds. |
| 71 | self.delayafterterminate = 0.1 |
| 72 | # Delay in seconds to sleep after each call to read_nonblocking(). |
| 73 | # Set this to None to skip the time.sleep() call completely: that |
| 74 | # would restore the behavior from pexpect-2.0 (for performance |
| 75 | # reasons or because you don't want to release Python's global |
| 76 | # interpreter lock). |
| 77 | self.delayafterread = 0.0001 |
| 78 | self.softspace = False |
| 79 | self.name = '<' + repr(self) + '>' |
| 80 | self.closed = True |
| 81 | |
| 82 | # Unicode interface |
| 83 | self.encoding = encoding |
| 84 | self.codec_errors = codec_errors |
| 85 | if encoding is None: |
| 86 | # bytes mode (accepts some unicode for backwards compatibility) |
| 87 | self._encoder = self._decoder = _NullCoder() |
| 88 | self.string_type = bytes |
| 89 | self.buffer_type = BytesIO |
| 90 | self.crlf = b'\r\n' |
nothing calls this directly
no test coverage detected