We'd really prefer using native python IO instead of relying on OS services.  For example, please see here: https://github.com/autotest/autotest/wiki/TestCodingStyle#gratuitous-use-of-shell-script-inside-a-python-program