def run_program(prog_list, debug, shell):
try:<EOL><INDENT>if not shell:<EOL><INDENT>process = Popen(prog_list, stdout=PIPE, stderr=PIPE)<EOL>stdout, stderr = process.communicate()<EOL>retcode = process.returncode<EOL>if debug >= <NUM_LIT:1>:<EOL><INDENT>print("<STR_LIT>", "<STR_LIT:U+0020>".join(prog_list))<EOL>print("<STR_LIT>", retcode)<EOL>print("<STR_LIT>", stdout)<EOL>print("<STR_LIT>", stderr)<EOL><DEDENT>return bool(retcode)<EOL><DEDENT>else:<EOL><INDENT>command = "<STR_LIT:U+0020>".join(prog_list)<EOL>os.system(command)<EOL>return True<EOL><DEDENT><DEDENT>except:<EOL><INDENT>return False<EOL><DEDENT>
Run a  program and check program return code Note that some commands don't work
    well with Popen.  So if this function is specifically called with 'shell=True',
    then it will run the old 'os.system'. In which case, there is no program output