I cannot get it it\'s bash related or python subprocess, but results are different:
>>> subprocess.Popen(\"echo $HOME\", shell=True, stdout=subproce
In the documentation found on https://docs.python.org/2/library/subprocess.html#popen-constructor, if you look at the shell argument you will find
The shell argument (which defaults to False) specifies whether to use the shell as the program to execute. If shell is True, it is recommended to pass args as a string rather than as a sequence.
Which means that when you execute the second command it runs as echo and hence you get just a new line.