예제 #1
0
파일: basic.py 프로젝트: joelimome/runfunc
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.")