Answers for "bash file to run python file"

5

How to run bash script in python

import subprocess
print "start"
subprocess.call("sleep.sh")
print "end"
Posted by: Guest on May-20-2020
0

run python script from bash script

#!/bin/bash

# using the full path of the 'python3' command is not necessary but should used.
# you can get your full path of the python command by running `which python3`
/usr/bin/python3 python_script.py
Posted by: Guest on January-18-2022

Code answers related to "bash file to run python file"

Python Answers by Framework

Browse Popular Code Answers by Language