Skip to content

Commit 6c02563

Browse files
authored
pty is not available on Windows
Refs python#6734
1 parent ff6d084 commit 6c02563

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

‎stdlib/pty.pyi‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1+
import sys
12
from typing import Callable, Iterable
23

3-
_Reader = Callable[[int], bytes]
4+
if sys.platform != "win32":
5+
_Reader = Callable[[int], bytes]
46

5-
STDIN_FILENO: int
6-
STDOUT_FILENO: int
7-
STDERR_FILENO: int
7+
STDIN_FILENO: int
8+
STDOUT_FILENO: int
9+
STDERR_FILENO: int
810

9-
CHILD: int
11+
CHILD: int
1012

11-
def openpty() -> tuple[int, int]: ...
12-
def master_open() -> tuple[int, str]: ...
13-
def slave_open(tty_name: str) -> int: ...
14-
def fork() -> tuple[int, int]: ...
15-
def spawn(argv: str | Iterable[str], master_read: _Reader = ..., stdin_read: _Reader = ...) -> int: ...
13+
def openpty() -> tuple[int, int]: ...
14+
def master_open() -> tuple[int, str]: ...
15+
def slave_open(tty_name: str) -> int: ...
16+
def fork() -> tuple[int, int]: ...
17+
def spawn(argv: str | Iterable[str], master_read: _Reader = ..., stdin_read: _Reader = ...) -> int: ...

0 commit comments

Comments
 (0)