Run a shell command from Django

Posted by Badifunky on Stack Overflow See other posts from Stack Overflow or by Badifunky
Published on 2010-06-14T12:09:54Z Indexed on 2010/06/14 12:12 UTC
Read the original article Hit count: 124

Filed under:
|
|

Hello, I'm developing a web page in Django (using apache server) that needs to call a shell command to enable/dissable some daemons. I'm try to do it with

os.system(service httpd restart 1>$HOME/out 2>$HOME/error)

and this command doesn't return anything. Any idea how can i fix this?

© Stack Overflow or respective owner

Related posts about python

Related posts about django