Beispiel #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')
Beispiel #2
0
 class Help(rf.Help):
     """\
     Indent
         Stuff
     """
     foo = rf.Check(int, "Stuff", opt='f')
     bar = rf.Regexp('\w{3}', "Hi")
Beispiel #3
0
 def arg(self):
     return rf.Check(int, "This is foo.")
Beispiel #4
0
 class Help(rf.Help):
     "Stuff"
     foo = rf.Check(int, "Foo option")
     bar = rf.Flag("Stuff", opt='b')
Beispiel #5
0
 class Help(rf.Help):
     bar = rf.Check(throw, "bang!")
Beispiel #6
0
 class Help(rf.Help):
     "Stuff"
     foo = rf.Check(int, "Foo option")
Beispiel #7
0
 class BaseHelp(rf.Help):
     foo = rf.Check(int, "Option 1")
Beispiel #8
0
 class Help(rf.Help):
     foo = rf.Check(int, "This is an option.")