Use subpprocess.Popen() to execute command since subprocess.check_output() was only introduced in python 2.7