0

I need to pass output of bash shell to the python script.

  1. I am opening one emulator and once will get error message on terminal
  2. I want to parse some data from stdout and stderr using python script
  3. once parsing is done I want to terminate emulator(which is opened in bash script)

I tried using pipe-lining but here python script is not getting started until manually I'm not terminating emulator. eg:

./start.sh | python file.py

I want to achieve automation. I want to stream output of one script to input to python script.

Can you suggest a way to achieve streaming in the two scripts?

Regards, Mann

Jacob Schoen
  • 14,034
  • 15
  • 82
  • 102
  • I believe this question has been answered already (you need to use sys.stdin.read()): http://stackoverflow.com/questions/11109859/pipe-output-from-shell-command-to-a-python-script – David Marx Mar 28 '13 at 20:45
  • it's not a duplicate. The OP is asking how to stop the original simulation once the python program has stopped. ( I think...) – brice Mar 29 '13 at 21:24

0 Answers0