disabling the line buffer somehow

  • Thread starter Can Burak Cilingir
  • Start date
C

Can Burak Cilingir

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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top