Wednesday, 15 September 2010

stdin - Does Python's raw_input interfere with socat? -



stdin - Does Python's raw_input interfere with socat? -

i trying utilize programme plus socat emulate serial device.

#echo.py n=0 while true: s = raw_input() if 'query' in s: print n n+=1

when seek link programme false serial port with

sudo socat -ddd -ddd pty,raw,link=/dev/ttys32,echo=0 exec:"python echo.py"

i don't when reading or writing port. if utilize readline instead of exec, serial info transferred , socat terminal no problem. raw_input doing behind scenes preventing socat providing normal stdin?

python stdin socat

No comments:

Post a Comment