I looked at the Python documentation and saw that there are 4-5 different versions of popen (), for example. os.popen (), os.popen2 (), etc.
Besides the fact that some of them include stderr and others do not, what are the differences between them and when will you use them? The documentation did not really explain this very well.
I would recommend using the subprocess module, which has all the functions that these functions have, and much more.
subprocess
Jason is right. To summarize, to make it easier to see:
popen2 does not write a standard error, popen3 makes a standard error and gives it a unique file descriptor. Finally, popen4 captures the standard error, but includes it in the same file object as the standard output.