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