def pretty_box (rows, cols, s):
    """This puts an ASCII text box around the given string, s.
    """
    top_bot = '+' + '-'*cols + '+\n'
    return top_bot + '\n'.join(['|'+line+'|' for line in s.split('\n')]) + '\n' + top_bot