def split_comment(line):
    """Split a line into line,comment, where a comment is
    started by the ! character"""
    res = line.strip().split('!')
    if len(res) == 0: return "",""
    elif len(res) == 1: return res[0],""
    elif len(res) == 2: return res
    return res[0],''.join(res[1:])