MCPcopy Create free account
hub / github.com/pexpect/pexpect / __init__

Method __init__

pexpect/socket_pexpect.py:37–66  ·  view source on GitHub ↗

This takes an open socket.

(
        self,
        socket: socket.socket,
        args=None,
        timeout=30,
        maxread=2000,
        searchwindowsize=None,
        logfile=None,
        encoding=None,
        codec_errors="strict",
        use_poll=False,
    )

Source from the content-addressed store, hash-verified

35 remote connections on both unix and windows."""
36
37 def __init__(
38 self,
39 socket: socket.socket,
40 args=None,
41 timeout=30,
42 maxread=2000,
43 searchwindowsize=None,
44 logfile=None,
45 encoding=None,
46 codec_errors="strict",
47 use_poll=False,
48 ):
49 """This takes an open socket."""
50
51 self.args = None
52 self.command = None
53 SpawnBase.__init__(
54 self,
55 timeout,
56 maxread,
57 searchwindowsize,
58 logfile,
59 encoding=encoding,
60 codec_errors=codec_errors,
61 )
62 self.socket = socket
63 self.child_fd = socket.fileno()
64 self.closed = False
65 self.name = "<socket %s>" % socket
66 self.use_poll = use_poll
67
68 def close(self):
69 """Close the socket.

Callers

nothing calls this directly

Calls 1

filenoMethod · 0.80

Tested by

no test coverage detected