disabling the line buffer somehow

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Can Burak Cilingir

    #1

    disabling the line buffer somehow

    Hi,

    I'm trying to proxy all keys typed by the user to a process spawned via
    popen2. Unfortunately, I figured out that I can't control really
    interactive applications such as mc or aptitude.

    All user input seems to be line buffered.
    http://pexpect.sourceforge.net/ has some words about the situation: Q:
    Why not just use a pipe (popen())?

    So, I understand that I cannot write a simple python code to
    transperantly proxy everything between any process and user typing from
    stdin without handling the raw terminal.

    Would it work if I read from the controlling tty of the python
    interpreter and write to the controlling tty of spawned process byte by
    byte (or /dev/stdin & /dev/stdout)

    Thanks..

Working...