title: Run a shell command from Django
body: <p>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 </p>
  
  <p><code>os.system(service httpd restart 1&gt;$HOME/out 2&gt;$HOME/error)</code></p>
  
  <p>and this command doesn't return anything. Any idea how can i fix this?</p>