Python 2.7 Compatibility

Subprocess from Python 2.7

The subprocess module included here is a direct import from python-2.7’s python standard library. You can access it via:

>>> from kitchen.pycompat27 import subprocess

The motivation for including this module is that various API changing improvements have been made to subprocess over time. The following is a list of the known changes to subprocess with the python version they were introduced in:

New API Feature Ver
subprocess.CalledProcessError 2.5
subprocess.check_call() 2.5
subprocess.check_output() 2.7
subprocess.Popen.send_signal() 2.6
subprocess.Popen.terminate() 2.6
subprocess.Popen.kill() 2.6

See also

The stdlib subprocess documenation
For complete documentation on how to use subprocess