- # TODO: argh. there has to be a better way
- openssh_process.stdin.close ()
- while openssh_process.poll () is None:
- sys.stdout.write (openssh_process.stdout.readline ())
-
- while True:
- line = openssh_process.stdout.readline ()
- if len (line) == 0:
- break
- sys.stdout.write (line.decode ("UTF-8"))