On Wednesday, April 5, 2017 at 2:38:00 PM UTC+2, Anssi Saari wrote:
> venkatachalam...@gmail.com writes:
> 
> > For example, the data is printed in
> > execute_sensor_process.py as follows:
> >
> > print >>sys.stderr,sens_data
> >
> > By printing the data onto sys.stderr and assigning a return variable in the 
> > bash, I am expecting the data to be assigned.
> >
> > But this is not happening.
> 
> This part I can answer alhtough I'm not sure it helps with your actual
> problems. 
> 
> Bash manual explicitly states command substition (the $(...) structure)
> replaces the command with the standard *output* of the command. So since
> your Python program writes to standard error, you get nothing.

Hi,

I understand your point. I tried by printing the standard output, but the 
result was the same. The output of one module is not captured in the bash 
script using the $(...) operation. So, I have switched to other possibilities 
of storing the data and accessing it from other program.

Thanks for your suggestion.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to