I fixed this by adding /usr/local/bin/python.

On Nov 6, 12:47 pm, octopusgrabbus <old_road_f...@verizon.net> wrote:
> This definitely has something to do with running runserver, because it
> works under that. I'm just trying to figure out what to configure in
> Apache to make it work.
>
> On Nov 6, 9:55 am, octopusgrabbus <old_road_f...@verizon.net> wrote:
>
> > Is there a trick to executing this command line
>
> > cmd_line = 'python /home/amr/bin/addReadSnap.py -s ' + str(cycle)
>
> > using this function from django?
>
> > import sys
> > import os
> > import string
>
> > from subprocess import call, Popen
>
> > def exec_external_cmd(cmd_line):
> >     retcode = None
> >     try:
> >         process = Popen(cmd_line, bufsize=2048, executable="/bin/
> > bash", shell=True, stdout=None, stderr=None)
>
> >         while retcode == None:
> >             retcode = process.poll()
>
> >         if retcode < 0:
> >             print >>sys.stderr, "Child was terminated by signal", -
> > retcode
> >         elif retcode > 0:
> >             print >>sys.stderr, "Child returned", retcode
>
> >     except OSError, e:
> >         print >>sys.stderr, "Execution failed:", e
>
> >     return retcode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to