Пример #1
0
class Help(rf.Help):
    """\
    This is a blurb about this program. Its very entertaining to
    watch and think about what we might do with it.

        Look ma. Formatted text.

    And stuff
    """
    usage = "%prog [options] value"

    value = rf.Check(int, "A value to multiply.")
    factor = rf.Check(float, "A factor by which to multiply.", opt='f')
    random = rf.Stream("r", "An input file to read from.", opt='r')
    verbose = rf.Flag("Multiply verbosely.", opt='v')
Пример #2
0
 class Help(rf.Help):
     """\
     Indent
         Stuff
     """
     foo = rf.Check(int, "Stuff", opt='f')
     bar = rf.Regexp('\w{3}', "Hi")
Пример #3
0
 def arg(self):
     return rf.Check(int, "This is foo.")
Пример #4
0
 class Help(rf.Help):
     "Stuff"
     foo = rf.Check(int, "Foo option")
     bar = rf.Flag("Stuff", opt='b')
Пример #5
0
 class Help(rf.Help):
     bar = rf.Check(throw, "bang!")
Пример #6
0
 class Help(rf.Help):
     "Stuff"
     foo = rf.Check(int, "Foo option")
Пример #7
0
 class BaseHelp(rf.Help):
     foo = rf.Check(int, "Option 1")
Пример #8
0
 class Help(rf.Help):
     foo = rf.Check(int, "This is an option.")