17 """Convenience class for user errors generated"""
28 print(
"{}: ({}) {}".format(os.path.basename(sys.argv[0]), form, msg))
31def print_info_line(msg):
35def print_error_line(msg):
41 Auxiliary class for execute_command() containing the
42 results of running a command
45 def __init__(self, args, stdout, stderr, returncode):
53def execute_command(args):
55 Run a command with arguments: args
57 Return RunResult containing stdout, stderr, returncode
59 handle = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
60 stdout, stderr = handle.communicate()
61 returncode = handle.wait()
62 return RunResult(args, stdout, stderr, returncode)
def __init__(self, args, stdout, stderr, returncode)
def print_line(msg, form="i")