'Convert a list of PBS command-line args (as in ``qsub(1B)``) to PBS\' internal attribute representations.
:returns: list of dicts -- The dicts map directly to pbs attropl structs (see ``pbs_submit(3B)``)'

def __args_to_attrs(self, args):

    rval = []
    for (arg, value) in args.items():
        if (arg == 'l'):
            resource_attrs = value.split(',')
            for (j, (res, val)) in enumerate([a.split('=', 1) for a in resource_attrs]):
                rval.append(dict(name=pbs.ATTR_l, value=val, resource=res))
        else:
            try:
                rval.append(dict(name=getattr(pbs, ('ATTR_' + arg)), value=value))
            except AttributeError as e:
                raise Exception(("Invalid    parameter    '%s':    %s" % (arg, e)))
    return rval
