You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/ansible-test-no-tty/ansible_collections/ns/col/run-with-pty.py

13 lines
233 B
Python

#!/usr/bin/env python
"""Run a command using a PTY."""
from __future__ import annotations
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)