Is it possible to execute shell script commands from python module? how to do it?

I don't have access to Linux, but Python has a number of modules and methods to run an external program from Python. Look in Python Help for details ...

# the os module has ...
os.system("program-name arg1 arg2")
# the subprocess module has ...
subprocess.call(["program-name", "arg1", "arg2"])
# if you need return arguments use subprocess.Popen(...)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.