You can use PTYs to solve this by:
- Creating a pty master/slave pair;
- Connecting the child process’s stdin, stdout and stderr to the pty slave device;
- Reading from and writing to the pty master in the parent.
More Related Contents:
- How to use `subprocess` command with pipes
- How to open every file in a folder
- Why is printing to stdout so slow? Can it be sped up?
- subprocess readline hangs waiting for EOF
- Pipe raw OpenCV images to FFmpeg
- How do I use subprocess.Popen to connect multiple processes by pipes?
- ImageMagick not authorized to convert PDF to an image
- How to set sys.stdout encoding in Python 3?
- Pycharm and sys.argv arguments
- Pass input/variables to command/script over SSH using Python Paramiko
- catching stdout in realtime from subprocess
- os.makedirs doesn’t understand “~” in my path
- Python read from subprocess stdout and stderr separately while preserving order
- How to activate virtualenv in Linux?
- standard_init_linux.go:178: exec user process caused “exec format error”
- Print to the same line and not a new line?
- Cross-platform subprocess with hidden window
- Suppress stdout / stderr print from Python functions
- How do I get monotonic time durations in python?
- Get total physical memory in Python
- Checking for interactive shell in a Python script
- ‘yes’ reporting error with subprocess communicate()
- How to redirect stdout to a Tkinter Text widget
- How to do sed like text replace with python?
- After Anaconda installation, conda command fails with “ImportError: no module named conda.cli”
- Listing available devices in python-opencv
- Cron job: how to run a script that requires to open display?
- What is different between makedirs and mkdir of os?
- On linux SUSE or RedHat, how do I load Python 2.7
- How can I capture the stdout output of a child process?