subprocess.Popen only needs file.fileno()
subprocess.Popen only needs file.fileno()

And isinstance(f, file) is a bad practice. Moreover, it's not compitible
with python 3.

fusionbox/python-spm,acatton/python-spm