Debian Codegraph @

test/integration/targets/fork_safe_stdio/run-with-pty.py

raw ◀ ▶
1 Debian patch touch this file
•1 #!/usr/bin/env python3
2 """Run a command using a PTY."""
3 from __future__ import annotations
4
5 import sys
6
7 if sys.version_info < (3, 10):
8 import vendored_pty as pty
9 else:
10 import pty
11
12 sys.exit(1 if pty.spawn(sys.argv[1:]) else 0)