def _getopt_flags(options):
    """ Convert the option list to a getopt flag string and long opt
        list

    """
    s = []
    l = []
    for o in options:
        if o.prefix == '-':
            s.append(o.name)
            if o.takes_argument:
                s.append(':')
        elif o.takes_argument:
            l.append(o.name + '=')
        else:
            l.append(o.name)
    return ''.join(s), l
