0

I want to be able to execute some shell commands like mkvirtualenv and createdb and such from a Django app, these processes will likely go into a Django celery task later. I would think using system() would be insecure to execute shell commands from Django/Apache, so my question is what is the best way to execute shell commands from a django app?

jeffci
  • 2,537
  • 6
  • 37
  • 59

1 Answers1

1

To start a shell process in the background you can use the subprocess module.

arie
  • 18,737
  • 5
  • 70
  • 76