Re: Simple subprocess help

2016-03-26 Thread Daniel Hepper
If I understand you correctly, you want to pipe the value of request.POST['post'] to the program run_pipeline.sh and store the output in a field of your instance. You are calling subprocess.Popen incorrectly. It should be: p = subprocess.Popen(['/path/to/run_pipeline.sh'], stdin=subprocess.PIP

Re: Simple subprocess help

2016-03-25 Thread Mike Dewhirst
On 26/03/2016 1:05 AM, Joshua Valdez wrote: I'm very new to django Sorry I didn't pay attention to this part of your question ... To amplfy my response, this is the sort of thing I would do in the save method of the model: from wherever import run_pipeline class Query(models.Model): ..

Re: Simple subprocess help

2016-03-25 Thread Mike Dewhirst
On 26/03/2016 1:05 AM, Joshua Valdez wrote: Okay, so I have figured out that the subprocess is the module that I want to use in this context and I have tried implementing some simple code based on the documentation but I am getting an |ExceptionType:OSErrorExceptionValue:[Errno2]Nosuch file or d

Simple subprocess help

2016-03-25 Thread Joshua Valdez
Okay, so I have figured out that the subprocess is the module that I want to use in this context and I have tried implementing some simple code based on the documentation but I am getting an Exception Type: OSErrorException Value: [Errno 2] No such file or directoryException Location: /Syste