Logo Search packages:      
Sourcecode: yapps2 version File versions  Download package

def yapps::runtime::Scanner::grab_input (   self  ) 

Get more input if possible.

Definition at line 232 of file runtime.py.

00232                           :
            """Get more input if possible."""
            if not self.file: return
            if len(self.input) - self.pos >= MIN_WINDOW: return

            data = self.file.read(MIN_WINDOW)
            if data is None or data == "":
                  self.file = None

            # Drop bytes from the start, if necessary.
            if self.pos > 2*MIN_WINDOW:
                  self.del_pos += MIN_WINDOW
                  self.del_line += self.input[:MIN_WINDOW].count("\n")
                  self.pos -= MIN_WINDOW
                  self.input = self.input[MIN_WINDOW:] + data
            else:
                  self.input = self.input + data

      def getchar(self):


Generated by  Doxygen 1.6.0   Back to index