We have certain modules like subprocess which can be used to call a shell script from python program. The below code shows how to call the module from python program.
#!/usr/bin/python
import subprocess as sp
sp.call(('hello2.sh')
For more information on subprocess module refer
https://docs.python.org/2/library/subprocess.html
#!/usr/bin/python
import subprocess as sp
sp.call(('hello2.sh')
For more information on subprocess module refer
https://docs.python.org/2/library/subprocess.html
Comments
Post a Comment