[pywin32-checkins] pywin32/Pythonwin/pywin/scintilla IDLEenvironment.py, 1.12, 1.13
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-11-26 02:17:25
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14615/pywin/scintilla Modified Files: IDLEenvironment.py Log Message: ensure our readlines methods used by our plugins always return bytes on py3k Index: IDLEenvironment.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/IDLEenvironment.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** IDLEenvironment.py 14 Nov 2008 00:22:25 -0000 1.12 --- IDLEenvironment.py 26 Nov 2008 01:32:59 -0000 1.13 *************** *** 43,55 **** def fast_readline(self): if self.finished: ! return "" ! if "_scint_lines" not in self.__dict__: ! # XXX - note - assumes this is only called once the file is loaded! ! self._scint_lines = self.text.edit.GetTextRange().split("\n") ! sl = self._scint_lines ! i = self.i = self.i + 1 ! if i >= len(sl): ! return "" ! return (sl[i]+"\n").encode(default_scintilla_encoding) try: --- 43,58 ---- def fast_readline(self): if self.finished: ! val = "" ! else: ! if "_scint_lines" not in self.__dict__: ! # XXX - note - assumes this is only called once the file is loaded! ! self._scint_lines = self.text.edit.GetTextRange().split("\n") ! sl = self._scint_lines ! i = self.i = self.i + 1 ! if i >= len(sl): ! val = "" ! else: ! val = sl[i]+"\n" ! return val.encode(default_scintilla_encoding) try: |