Python session 4 subprocess by GOPAL.A
11
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
-
Upload
navaneethan-naveen -
Category
Education
-
view
102 -
download
3
Transcript of Python session 4 subprocess by GOPAL.A
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