Quantcast
Channel: Unable to fake terminal input with termios.TIOCSTI - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Bruno Bronosky for Unable to fake terminal input with termios.TIOCSTI

I took the answer from @Ulfalizer and expanded it a bit to be a complete and usable app.import sysimport fcntlimport termiosimport argparseparser = argparse.ArgumentParser()parser.add_argument('tty',...

View Article


Answer by Ulfalizer for Unable to fake terminal input with termios.TIOCSTI

TIOCSTI is an ioctl (documented in tty_ioctl(4)), not a terminal setting, so you can't use tcsetattr() -- you need to feed each character of the fake input to ioctl() instead. Never had to do ioctl's...

View Article


Unable to fake terminal input with termios.TIOCSTI

Most of the code samples I've seen are trying to read from stdin without local echo. To do this they modify the "local modes" flag to remove the setting to "Echo input characters". I thought I could...

View Article
Browsing all 3 articles
Browse latest View live