wormpy/stty.py

13 lines
242 B
Python
Raw Normal View History

2021-08-30 09:22:06 -07:00
import subprocess
def stty(raw=None, echo=None):
args = ['stty']
if raw is not None:
args.append('raw' if raw else '-raw')
if echo is not None:
args.append('echo' if echo else '-echo')
subprocess.run(args)