Conditionally import subprocess backport. Use context manager-style popen.