def CommandLine(command, args):
  """Convert an executable path and a sequence of arguments into a command
  line that can be passed to CreateProcess"""

  cmd = "\"" + command.replace("\"", "\"\"") + "\""
  for arg in args:
    cmd = cmd + " \"" + arg.replace("\"", "\"\"") + "\""
  return cmd