I would like to execute multiple commands in a row:
iei.e. (just to illustrate my need):
cmdcmd (the shell)
then
cd dircd dir
and
lsls
and read the result of the lsls.
Any idea with subprocess module subprocess module?
UPDATE:Update:
cd dircd dir and lsls are just an example. I need to run complex commands (following a particular order, without any pipelining). In fact, iI would like one subprocess shell and the ability to launch many commands on it.