summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/fork_safe_stdio/run-with-pty.py
blob: 463915284b2d2c2ac7cf694678b94aa331ad1a2b (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
"""Run a command using a PTY."""

import sys

if sys.version_info < (3, 10):
    import vendored_pty as pty
else:
    import pty

sys.exit(1 if pty.spawn(sys.argv[1:]) else 0)