parameters: (self, file, encoding=None)
docstring: @param file A file-like object holding your input. Only the read()
             method must be implemented.
  
          @param encoding If you set the optional encoding argument, then the
             data will be decoded on the fly.
docstring_summary: @param file A file-like object holding your input. Only the read()
             method must be implemented.
docstring_tokens: @param file A file - like object holding your input . Only the read () method must be implemented .
function: def __init__(self, file, encoding=None):
          """
          @param file A file-like object holding your input. Only the read()
             method must be implemented.
  
          @param encoding If you set the optional encoding argument, then the
             data will be decoded on the fly.
             
          """
          
          if encoding is not None:
              # wrap input in a decoding reader
              reader = codecs.lookup(encoding)[2]
              file = reader(file)
  
          data = file.read()
              
          ANTLRStringStream.__init__(self, data)
function_tokens: def __init__ ( self , file , encoding = None ) : if encoding is not None : # wrap input in a decoding reader reader = codecs . lookup ( encoding ) [ 2 ] file = reader ( file ) data = file . read ( ) ANTLRStringStream . __init__ ( self , data )