'return valid, output, help, show_warnings, debug, file'

def get_options(self):

    return_options = self.__get_config_options()
    options_dict = {'dir': [1], 'help': [0, 'h'], 'show-warnings': [0], 'caps': [0], 'no-caps': [0], 'symbol': [0], 'no-symbol': [0], 'windings': [0], 'no-wingdings': [0], 'zapf': [0], 'no-zapf': [0], 'font': [0], 'no-font': [0], 'dtd': [1], 'no-dtd': [0], 'version': [0], 'output': [1, 'o'], 'no-namespace': [0], 'level': [1], 'indent': [1], 'no-lists': [0], 'lists': [0], 'group-styles': [0], 'no-group-styles': [0], 'group-borders': [0], 'no-group-borders': [0], 'headings-to-sections': [0], 'no-headings-to-sections': [0], 'empty-para': [0], 'no-empty-para': [0], 'format': [1, 'f'], 'config': [0]}
    options_obj = options_trem.ParseOptions(system_string=self.__system_arguments, options_dict=options_dict)
    (options, arguments) = options_obj.parse_options()
    if (options == 0):
        return_options['valid'] = 0
        return return_options
    the_keys = options.keys()
    return_options['help'] = 0
    if ('help' in the_keys):
        return_options['help'] = 1
        return return_options
    return_options['config'] = 0
    if ('config' in the_keys):
        return_options['config'] = 1
        return return_options
    return_options['version'] = 0
    if ('version' in the_keys):
        return_options['version'] = 1
        return return_options
    return_options['out-dir'] = 0
    if ('dir' in the_keys):
        out_dir = options['dir']
        if (not os.path.isdir(out_dir)):
            sys.stderr.write('Your    output    must    be    an    existing    directory.\n')
            return_options['valid'] = 0
        else:
            return_options['dir'] = options['dir']
    return_options['out-file'] = 0
    if ('output' in the_keys):
        return_options['out-file'] = options['output']
    else:
        pass
        "\n                                                sys.stderr.write(\n                                                                'You    must    provide    an    ouput    file    with    the    'o'    option\n')\n                                                return_options['valid']    =    0\n                                                "
    if ('level' in the_keys):
        return_options['level'] = options['level']
    the_level = return_options.get('level')
    if the_level:
        try:
            return_options['level'] = int(the_level)
        except ValueError:
            sys.stderr.write('The    options    "--level"    must    be    a    number.\n')
            return_options['valid'] = 0
            return return_options
    if ('dtd' in the_keys):
        return_options['raw-dtd-path'] = options['dtd']
    acceptable = ['sdoc', 'raw', 'tei']
    if ('format' in the_keys):
        format = options['format']
        if (format not in acceptable):
            sys.stderr.write("--format    must    take    either    'sdoc'    or    'tei'\n")
            return_options['valid'] = 0
            return return_options
        else:
            return_options['format'] = options['format']
    return_options['show-warnings'] = 0
    if ('show-warnings' in the_keys):
        return_options['show-warnings'] = 1
    if ('no-font' in the_keys):
        return_options['convert-symbol'] = 0
        return_options['convert-zapf'] = 0
        return_options['convert-wingdings'] = 0
    if ('font' in the_keys):
        return_options['convert-symbol'] = 1
        return_options['convert-zapf'] = 1
        return_options['convert-wingdings'] = 1
    if ('symbol' in the_keys):
        return_options['convert-symbol'] = 1
    if ('no-symbol' in the_keys):
        return_options['convert-symbol'] = 0
    if ('wingdings' in the_keys):
        return_options['convert-wingdings'] = 1
    if ('no-wingdings' in the_keys):
        return_options['convert-wingdings'] = 0
    if ('zapf' in the_keys):
        return_options['convert-zapf'] = 1
    if ('no-zapf' in the_keys):
        return_options['convert-zapf'] = 0
    if ('caps' in the_keys):
        return_options['convert-caps'] = 1
    if ('no-caps' in the_keys):
        return_options['convert-caps'] = 0
    if ('no-dtd' in the_keys):
        return_options['no-dtd'] = 1
    else:
        return_options['no-dtd'] = 0
    return_options['no-ask'] = 0
    if ('no-ask' in the_keys):
        return_options['no-ask'] = 1
        sys.stderr.write('You    can    also    permanetly    set    the    no-ask    option    in    the    rtf2xml    file.\n')
    if ('no-namespace' in the_keys):
        return_options['no-namespace'] = 1
    if ('headings-to-sections' in the_keys):
        return_options['headings-to-sections'] = 1
    elif ('no-headings-to-sections' in the_keys):
        return_options['headings-to-sections'] = 0
    if ('no-lists' in the_keys):
        return_options['form-lists'] = 0
    elif ('lists' in the_keys):
        return_options['form-lists'] = 1
    if ('group-styles' in the_keys):
        return_options['group-styles'] = 1
    elif ('no-group-styles' in the_keys):
        return_options['group-styles'] = 0
    if ('group-borders' in the_keys):
        return_options['group-borders'] = 1
    elif ('no-group-borders' in the_keys):
        return_options['group-borders'] = 0
    if ('empty-para' in the_keys):
        return_options['empty-paragraphs'] = 1
    elif ('no-empty-para' in the_keys):
        return_options['empty-paragraphs'] = 0
    if (len(arguments) == 0):
        sys.stderr.write('You    must    provide    a    file    to    convert.\n')
        return_options['valid'] = 0
        return return_options
    elif (len(arguments) > 1):
        sys.stderr.write('You    can    only    convert    one    file    at    a    time.\n')
        return_options['valid'] = 0
    else:
        return_options['in-file'] = arguments[0]
    smart_output = return_options.get('smart-output')
    if (smart_output == 'false'):
        smart_output = 0
    if (smart_output and (not return_options['out-file'])):
        in_file = return_options['in-file']
        (the_file_name, ext) = os.path.splitext(in_file)
        if (ext != '.rtf'):
            sys.stderr.write('Sorry,    but    this    file    does    not    have    an    "rtf"    extension,    so    \nthe    script    will    not    attempt    to    convert    it.\nIf    it    is    in    fact    an    rtf    file,    use    the    "-o"    option.\n')
            return_options['valid'] = 0
        else:
            return_options['out-file'] = ('%s.xml' % the_file_name)
    if ((not smart_output) and (not return_options['out-file'])):
        '\n                                                sys.stderr.write(\n                                                                \'Please    provide    and    file    to    outut    with    the    -o    option.\n\'\n                                                                \'Or    set    \'<smart-output    value    =    "true"/>\'.\n\'\n                                                                \'in    the    configuration    file.\n\'\n                                                                )\n                                                return_options[\'valid\']    =    0\n                                                '
        pass
    if ('indent' in the_keys):
        try:
            value = int(options['indent'])
            return_options['indent'] = value
        except ValueError:
            sys.stderr.write('--indent    must    take    an    integer')
            return_options['valid'] = 0
    '\n                                the_format    =    return_options.get(\'format\')\n                                if    the_format    !=    \'raw\':\n                                                no_pyxml    =    return_options.get(\'no-pyxml\')\n                                                if    no_pyxml:\n                                                                sys.stderr.write(\'You    want    to    convert    your    file    to    "%s".\n\'\n                                                                                                \'Sorry,    but    you    must    have    pyxml    installed\n\'\n                                                                                                \'in    order    to    convert    your    document    to    anything    but    raw    XML.\n\'\n                                                                                                \'Please    do    not    use    the    --format    option.\n\n\'\n                                                                                                %    the_format\n                                                                                )\n                                                                return_options[\'valid\']    =    0\n                                                xslt_proc    =    return_options.get(\'xslt-processor\')\n                                                if    xslt_proc    ==    None    and    not    no_pyxml:\n                                                                sys.stderr.write(\'You    want    to    convert    your    file    to    "%s".\n\'\n                                                                                                \'Sorry,    but    you    must    have    an    xslt    processor    set    up\n\'\n                                                                                                \'in    order    to    conevert    your    document    to    anything    but    raw    XML.\n\'\n                                                                                                \'Please    use    --format    raw.\n\n\'\n                                                                                                %    the_format\n                                                                                                )\n                                                                return_options[\'valid\']    =    0\n                                '
    return return_options
