use readavailable, takebuf_string doesn't work
flush again after pyout disply