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