2

I have a web application written in angular.js and I've a python script run.py saved in my downloads directory, which is the sane directory as the app.

When I start the app in the working directory, which is also the directory that has the python script, I want the app to execute run.py. This should happen everytime the app is started/initialized. How can I achieve this? Is this achievable?

3
  • 1
    Does this answer your question? NodeJs execute command in background and forget You should be able to launch your script as part of your webserver startup code in a subprocess. Commented Jan 30, 2023 at 4:28
  • Is the app in the same directory? If not, how should it know where the script is - will the path be hard-coded, for example? Or do you want to use the fact that the script is in the current working directory? Anyway, this is not a Python question, and run.sh is a strange name for a Python script (it makes it look like it should be a shell script instead). Commented Jan 30, 2023 at 6:19
  • @KarlKnechtel Yes, the app is in the same directory. I want ti use the fact that the script is in the current working directory. I have corrected the file name, it was a mistake on my path. Commented Jan 30, 2023 at 12:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.