+# add quotes around a shell arg only if it has spaces
+def pretty_arg(shell_arg):
+ return shell_arg if ' ' not in shell_arg else "'{}'".format(shell_arg)
+def pretty_args(shell_args):
+ return " ".join([pretty_arg(shell_arg) for shell_arg in shell_args])
+