def BreakString( s, maxLen ):
    """Break string into lines of at most given length"""

    quot, rem = divmod( len( s ), maxLen )
    r = [ s[i*maxLen:(i+1)*maxLen] for i in range( quot ) ]
    if len( s ) % maxLen:
        r.append( s[-rem:] )

    return r