def strNoComment(string,comment=None):
    """Remove the comments from a line string:
    If the string starts with the comment symbol, return None.
    Otherwise, the chars after the first comment symbol are removed."""
    string=string.strip() # Remove the white space on both sides.
    if comment is not None: 
        sList=string.split(comment)
        return sList[0]
    else: return string