Re: Data exchange between python script and bash script

2017-04-19 Thread Erik
[Disclaimer: I have not fully read this thread. If I'm jumping in with something that's irrelevant for other reasons, please just ignore me] On 19/04/17 22:06, Venkatachalam Srinivasan wrote: On Thursday, April 6, 2017 at 12:55:41 AM UTC+2, Gregory Ewing wrote: sensor_data=$(python execute_sen

Re: Data exchange between python script and bash script

2017-04-19 Thread Venkatachalam Srinivasan
On Thursday, April 6, 2017 at 12:55:41 AM UTC+2, Gregory Ewing wrote: > Anssi Saari wrote: > > Bash manual explicitly states command substition (the $(...) structure) > > replaces the command with the standard *output* of the command. > > Another problem is your use of '&' here: > > sensor_da

Re: Data exchange between python script and bash script

2017-04-19 Thread Venkatachalam Srinivasan
On Tuesday, April 4, 2017 at 7:58:56 PM UTC+2, justin walters wrote: > On Tue, Apr 4, 2017 at 10:39 AM, Venkatachalam Srinivasan < > venkatachalam...@gmail.com> wrote: > > > Hi, > > > > Thanks for the answer. I need bash for connecting data exchange between > > two python scripts. To be more speci

Re: Data exchange between python script and bash script

2017-04-19 Thread Venkatachalam Srinivasan
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 vari

Re: Data exchange between python script and bash script

2017-04-05 Thread Gregory Ewing
Anssi Saari wrote: Bash manual explicitly states command substition (the $(...) structure) replaces the command with the standard *output* of the command. Another problem is your use of '&' here: sensor_data=$(python execute_sensor_process.py) & The '&' causes the whole command, including

Re: Data exchange between python script and bash script

2017-04-05 Thread Anssi Saari
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 hap

Re: Data exchange between python script and bash script

2017-04-04 Thread justin walters
On Tue, Apr 4, 2017 at 10:39 AM, Venkatachalam Srinivasan < venkatachalam...@gmail.com> wrote: > Hi, > > Thanks for the answer. I need bash for connecting data exchange between > two python scripts. To be more specific, data from one script has to be > passed to the another script. You are right,

Re: Data exchange between python script and bash script

2017-04-04 Thread Rhodri James
On 04/04/17 18:07, Venkatachalam Srinivasan wrote: On Tuesday, April 4, 2017 at 5:27:42 PM UTC+2, cassiope wrote: On Tue, 04 Apr 2017 08:01:42 -0700, venkatachalam.19 wrote: Hello All, I am writing a python code for processing a data obtained from a sensor. The data from sensor is obtained b

Re: Data exchange between python script and bash script

2017-04-04 Thread Venkatachalam Srinivasan
On Tuesday, April 4, 2017 at 5:42:23 PM UTC+2, justin walters wrote: > On Tue, Apr 4, 2017 at 8:01 AM, wrote: > > > Hello All, > > > > I am writing a python code for processing a data obtained from a sensor. > > The data from sensor is obtained by executing a python script. The data > > obtained

Re: Data exchange between python script and bash script

2017-04-04 Thread Venkatachalam Srinivasan
On Tuesday, April 4, 2017 at 5:27:42 PM UTC+2, cassiope wrote: > On Tue, 04 Apr 2017 08:01:42 -0700, venkatachalam.19 wrote: > > > Hello All, > > > > I am writing a python code for processing a data obtained from a sensor. > > The data from sensor is obtained by executing a python script. The da

Re: Data exchange between python script and bash script

2017-04-04 Thread justin walters
On Tue, Apr 4, 2017 at 8:01 AM, wrote: > Hello All, > > I am writing a python code for processing a data obtained from a sensor. > The data from sensor is obtained by executing a python script. The data > obtained should be further given to another python module where the > received data is used

Re: Data exchange between python script and bash script

2017-04-04 Thread Frank Miles
On Tue, 04 Apr 2017 08:01:42 -0700, venkatachalam.19 wrote: > Hello All, > > I am writing a python code for processing a data obtained from a sensor. The > data from sensor is obtained by executing a python script. The data obtained > should be further given to another python module where the r

Data exchange between python script and bash script

2017-04-04 Thread venkatachalam . 19
Hello All, I am writing a python code for processing a data obtained from a sensor. The data from sensor is obtained by executing a python script. The data obtained should be further given to another python module where the received data is used for adjusting the location of an object. For ach