parameters: (fname)
return_statement: return (None, None)
docstring: Guess the encoding of a file by brute force by trying one
      encoding after the next until something succeeds.
      @param fname: file path to read from
      @todo: deprecate this method
docstring_summary: Guess the encoding of a file by brute force by trying one
      encoding after the next until something succeeds.
      @param fname: file path to read from
      @todo: deprecate this method
docstring_tokens: Guess the encoding of a file by brute force by trying one encoding after the next until something succeeds . @param fname : file path to read from @todo : deprecate this method
function: def FallbackReader(fname):
      """Guess the encoding of a file by brute force by trying one
      encoding after the next until something succeeds.
      @param fname: file path to read from
      @todo: deprecate this method
  
      """
      txt = None
      with open(fname, 'rb') as handle:
          byte_str = handle.read()
          for enc in GetEncodings():
              try:
                  txt = byte_str.decode(enc)
              except Exception, msg:
                  continue
              else:
                  return (enc, txt)
  
      return (None, None)
function_tokens: def FallbackReader ( fname ) : txt = None with open ( fname , 'rb' ) as handle : byte_str = handle . read ( ) for enc in GetEncodings ( ) : try : txt = byte_str . decode ( enc ) except Exception , msg : continue else : return ( enc , txt ) return ( None , None )