Example #1
0
        def wrapper():
            try:
                # call the command
                method(parser)

            except Exception, e:
                print
                print styled("*** error: %s" % str(e), attrs=["red"])
                raise
Example #2
0
        def wrapper():
            try:
                # call the command
                method(parser)

            except Exception, e:
                print
                print styled("*** error: %s" % str(e), attrs=["red"])
                raise
Example #3
0
def required_style(msg):
    return styled(" %s " % msg, attrs=["reverse"])
Example #4
0
def header(msg, attrs):
    attrs += ["bold"]
    padding = styled(" "*8 + " "*len(msg), attrs=attrs)
    padded_message = styled(" "*4 + msg + " "*4, attrs=attrs)
    return "%s\n%s\n%s" % (padding, padded_message, padding)
Example #5
0
def result_style(msg):
    return styled(" %s " % msg, attrs=["bgmagenta", "white"])
Example #6
0
def optional_style(msg):
    return styled(" %s " % msg, attrs=["reverse"])
Example #7
0
 def print_command(name, description):
     print styled(format_string % dict(name=name),
                  attrs=["bold"]), description
Example #8
0
 def print_command(name, description):
     print styled(format_string % dict(name=name), attrs=["bold"]), description
Example #9
0
def header(msg, attrs):
    attrs += ["bold"]
    padding = styled(" " * 8 + " " * len(msg), attrs=attrs)
    padded_message = styled(" " * 4 + msg + " " * 4, attrs=attrs)
    return "%s\n%s\n%s" % (padding, padded_message, padding)
Example #10
0
def result_style(msg):
    return styled(" %s " % msg, attrs=["bgmagenta", "white"])
Example #11
0
def optional_style(msg):
    return styled(" %s " % msg, attrs=["reverse"])
Example #12
0
def required_style(msg):
    return styled(" %s " % msg, attrs=["reverse"])