I've read about Subprocess module from python documentation and from Stackoverflow as well ! But i am unable to implement the concept ! Like for example :
So how can I execute following command line using python ?
I've read about Subprocess module from python documentation and from Stackoverflow as well ! But i am unable to implement the concept ! Like for example :
So how can I execute following command line using python ?
You can do it using subprocess.call
subprocess.call(args, *, stdin=None, stdout=None, stderr=None, shell=False)
Here * is the bufsize, 0 means unbuffered, 1 means line buffered, any other positive value means use a buffer of approximately that size. The default value for bufsize is 0 (unbuffered).
Example (from the docs)-
from subprocess import call
subprocess.call(["ls", "-l"])