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

12 lines
198 B
Python

#!/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)