python session 4 subprocess- by gopal.a (python developer)
TRANSCRIPT
Python Execute Unix / Linux Command
l There are two modules in python to excute the linux commands.
l 1. os module l 2. subprocess module
l syntax:
l subprocess.call(args, *, stdin=None, stdout=None, stderr=None, shell=false)
l PASSING ARGUMENTS
l SUBPROCESS.POPEN( ) - STDOUT AND STDERR
l Popen.communicate() interacts with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached.
SHELL VALUE