Yes. Expect did solve this problem for me. Especially the raw_pty method.
In reply to Re^2: Non-buffered read from program by arc_of_descent in thread Non-buffered read from program by arc_of_descent