[Python-checkins] python/dist/src/Lib/idlelib CREDITS.txt,1.8,1.9 aboutDialog.py,1.11,1.12

loewis@users.sourceforge.net loewis@users.sourceforge.net
Sun, 15 Jun 2003 15:28:07 -0700


Update of /cvsroot/python/python/dist/src/Lib/idlelib
In directory sc8-pr-cvs1:/tmp/cvs-serv13436

Modified Files:
	CREDITS.txt aboutDialog.py 
Log Message:
Make CREDITS.txt a Latin-1 file. Extend ViewFile to support file encodings.


Index: CREDITS.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/CREDITS.txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** CREDITS.txt	12 Jun 2003 03:50:55 -0000	1.8
--- CREDITS.txt	15 Jun 2003 22:28:05 -0000	1.9
***************
*** 23,27 ****
  integration and persistent breakpoints).
  
! Hernan Foffani, Christos Georgiou, Martin v. Loewis, Jason Orendorff, Noam
  Raphael, Josh Robb, Nigel Rowe, and Bruce Sherwood have submitted useful
  patches.  Thanks, guys!
--- 23,27 ----
  integration and persistent breakpoints).
  
! Hernan Foffani, Christos Georgiou, Martin v. Löwis, Jason Orendorff, Noam
  Raphael, Josh Robb, Nigel Rowe, and Bruce Sherwood have submitted useful
  patches.  Thanks, guys!

Index: aboutDialog.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/aboutDialog.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** aboutDialog.py	12 Jun 2003 04:20:55 -0000	1.11
--- aboutDialog.py	15 Jun 2003 22:28:05 -0000	1.12
***************
*** 119,123 ****
  
      def ShowIDLECredits(self):
!         self.ViewFile('About - Credits','CREDITS.txt')
  
      def ShowIDLEAbout(self):
--- 119,123 ----
  
      def ShowIDLECredits(self):
!         self.ViewFile('About - Credits','CREDITS.txt', 'iso-8859-1')
  
      def ShowIDLEAbout(self):
***************
*** 132,138 ****
          textView.TextViewer(self, title, None, data)
  
!     def ViewFile(self,viewTitle,viewFile):
          fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),viewFile)
!         textView.TextViewer(self,viewTitle,fn)
  
      def Ok(self, event=None):
--- 132,151 ----
          textView.TextViewer(self, title, None, data)
  
!     def ViewFile(self, viewTitle, viewFile, encoding=None):
          fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),viewFile)
!         if encoding:
!             import codecs
!             try:
!                 textFile = codecs.open(fn, 'r')
!             except IOError:
!                 tkMessageBox.showerror(title='File Load Error',
!                                        message='Unable to load file '+
!                                        `fileName`+' .')
!                 return
!             else:
!                 data = textFile.read()
!         else:
!             data = None
!         textView.TextViewer(self, viewTitle, fn, data=data)
  
      def Ok(self, event=None):