1

I am developing a web app using django. I've a script shell that runs python codes for image processing. I want to execute this script shell using my web app so that users can apply image processing just by using a button in the web interface. (for the moment i'm working localy , the django web app and the script shell are in the same folder). I don't know how to do it. can you help me ? thank you in advance.

1 Answer 1

1

Python standard library has the subprocess module which can be used just for that. For instance, given ./script.sh is your shell script a call to subprocess.call will do the work:


    >>> import subprocess
    >>> # From your working directory:
    >>> subprocess.call(["./script.sh"])

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.