def pop_required_arg(arglist, previousArg) :
  """
  Pop the first element off the list and return it.
  If the list is empty, raise an exception about a missing argument after the $previousArgument
  """
  if not len(arglist) :
    raise Exception, "Missing required parameter after %s" % previousArg
  head = arglist[0]
  del arglist[0]
  return head