Esempio n. 1
0
File: conf.py Progetto: afcarl/f2py
                continue
            try:
                set_options = getattr (script_options, 'set_%s_options' % (script_name))
            except AttributeError, msg:
                print msg
                continue
            parser = OptionParser()
            set_formatter (parser)
            parser.add_option('--no-gui', action='store_false', default=True, help='Run script without opening GUI.')
            set_options (parser)
            parser.prog = 'fparser.%s' % (script_name)
            if parser.description is None:
                print 'Warning: %s does not have a description (use parser.set_description in %s.script_options.%s)' % (parser.prog, package_name,set_options.__name__)
                parser.description = 'PFI'

            descr = parser.get_description()
            descr_title = descr.lstrip().split('\n')[0]
            help = parser.format_help()
            help += '''
See also
========
:mod:`%s`
''' % (package_name)
            scripts_info[parser.prog] = dict(
                name = script_name,
                descr_title = descr_title,
                help = help)


name_len = 0
descr_len = 0