def readline_strip(stream):
    """Read one line of the given file/stream and remove the trailing 
    newline"""
    assert hasattr(stream,"read")
    line = stream.readline()
    line = line.rstrip("\n")
    return line