class_docstr: A base class providing the backwards-compatible spawn API for Pexpect.
  
  This should not be instantiated directly: use :class:`pexpect.spawn` or
  :class:`pexpect.fdpexpect.fdspawn`.
docstr: This reads and returns one entire line. The newline at the end of
  line is returned as part of the string, unless the file ends without a
  newline. An empty string is returned if EOF is encountered immediately.
  This looks for a newline as a CR/LF pair (\r\n) even on UNIX because
  this is what the pseudotty device returns. So contrary to what you may
  expect you will receive newlines as \r\n.
  
  If the size argument is 0 then an empty string is returned. In all
  other cases the size argument is ignored, which is not standard
  behavior for a file-like object. 
docstr_tok: ["This","reads","and","returns","one","entire","line",".","The","newline","at","the","end","of","line","is","returned","as","part","of","the","string",",","unless","the","file","ends","without","a","newline",".","An","empty","string","is","returned","if","EOF","is","encountered","immediately",".","This","looks","for","a","newline","as","a","CR\/LF","pair","(","\\r\\n",")","even","on","UNIX","because","this","is","what","the","pseudotty","device","returns",".","So","contrary","to","what","you","may","expect","you","will","receive","newlines","as","\\r\\n",".","If","the","size","argument","is","0","then","an","empty","string","is","returned",".","In","all","other","cases","the","size","argument","is","ignored",",","which","is","not","standard","behavior","for","a","file-like","object","."]
code: def readline(self, size=-1):
      """This reads and returns one entire line. The newline at the end of
      line is returned as part of the string, unless the file ends without a
      newline. An empty string is returned if EOF is encountered immediately.
      This looks for a newline as a CR/LF pair (\\r\\n) even on UNIX because
      this is what the pseudotty device returns. So contrary to what you may
      expect you will receive newlines as \\r\\n.
  
      If the size argument is 0 then an empty string is returned. In all
      other cases the size argument is ignored, which is not standard
      behavior for a file-like object."""
  
      if size == 0:
          return self.string_type()
      # delimiter default is EOF
      index = self.expect([self.crlf, self.delimiter])
      if index == 0:
          return self.before + self.crlf
      else:
          return self.before
  
imports: from io import StringIO, BytesIO
  import codecs
  import os
  import sys
  import re
  import errno
  from .exceptions import ExceptionPexpect, EOF, TIMEOUT
  from .expect import Expecter, searcher_string, searcher_re
label_desc: Use image node_id 16 for calling the SpawnBase obj's underlying member method code with example usage: obj.readline(size) and returns: self, unknown, self