(filename)
return text
Open a file in read only mode using the encoding detected by
    detect_encoding().
Open a file in read only mode using the encoding detected by
    detect_encoding().
Open a file in read only mode using the encoding detected by detect_encoding () .
def open(filename):
    """Open a file in read only mode using the encoding detected by
    detect_encoding().
    """
    buffer = builtins.open(filename, 'rb')
    encoding, lines = detect_encoding(buffer.readline)
    buffer.seek(0)
    text = TextIOWrapper(buffer, encoding, line_buffering=True)
    text.mode = 'r'
    return text
def open ( filename ) : buffer = builtins . open ( filename , 'rb' ) encoding , lines = detect_encoding ( buffer . readline ) buffer . seek ( 0 ) text = TextIOWrapper ( buffer , encoding , line_buffering = True ) text . mode = 'r' return text