diff options
Diffstat (limited to 'libbe')
-rw-r--r-- | libbe/cmdutil.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py index 78b7571..ab0e8be 100644 --- a/libbe/cmdutil.py +++ b/libbe/cmdutil.py @@ -81,6 +81,15 @@ def execute(cmd, args): def help(cmd, args): return get_command(cmd).help() +def underlined(instring): + """Produces a version of a string that is underlined with '=' + + >>> underlined("Underlined String") + 'Underlined String\\n=================' + """ + + return "%s\n%s" % (instring, "="*len(instring)) + def _test(): import doctest import sys |