Jan-30-2024, 09:05 PM
Safety note:
Safer:
The shebang for bash:
shell=True
should not be used under any circumstances.Safer:
from subprocess import Popen Popen(["python", "your_app.py"])Safer with the help of shlex:
import shlex from subprocess import Popen command = shlex.split("python your_app.py") print(command) Popen(command)If you make your script executable, then add the shebang, which runs the right interpreter. e.g., you can also run Perl, PHP, Ruby and many other interpreted languages with the help of the shebang.
The shebang for bash:
#!/bin/bashThe shebang for python:
#!/usr/bin/env python3The shebang for PHP:
#!/usr/bin/env php
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!