I would like to execute multiple commands in a row:
i.e. (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.