[Python-checkins] CVS: python/dist/src/Tools/pynche PyncheWidget.py,2.26,2.27
Barry Warsaw
bwarsaw@users.sourceforge.net
Tue, 10 Jul 2001 14:43:45 -0700
Update of /cvsroot/python/python/dist/src/Tools/pynche
In directory usw-pr-cvs1:/tmp/cvs-serv30524
Modified Files:
PyncheWidget.py
Log Message:
De-string-module-ification.
Index: PyncheWidget.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/pynche/PyncheWidget.py,v
retrieving revision 2.26
retrieving revision 2.27
diff -C2 -r2.26 -r2.27
*** PyncheWidget.py 2001/04/18 03:50:07 2.26
--- PyncheWidget.py 2001/07/10 21:43:43 2.27
***************
*** 7,11 ****
import sys
import os
- import string
from Tkinter import *
import tkMessageBox
--- 7,10 ----
***************
*** 222,228 ****
contents = fp.read()
# wax the last page, it contains Emacs cruft
! i = string.rfind(contents, '\f')
if i > 0:
! contents = string.rstrip(contents[:i])
finally:
if fp:
--- 221,227 ----
contents = fp.read()
# wax the last page, it contains Emacs cruft
! i = contents.rfind('\f')
if i > 0:
! contents = contents[:i].rstrip()
finally:
if fp:
***************
*** 259,267 ****
self.__menutext = module.ADDTOVIEW
# find the underline character
! underline = string.find(module.ADDTOVIEW, '%')
if underline == -1:
underline = 0
else:
! self.__menutext = string.replace(module.ADDTOVIEW, '%', '', 1)
self.__underline = underline
self.__window = None
--- 258,266 ----
self.__menutext = module.ADDTOVIEW
# find the underline character
! underline = module.ADDTOVIEW.find('%')
if underline == -1:
underline = 0
else:
! self.__menutext = module.ADDTOVIEW.replace('%', '', 1)
self.__underline = underline
self.__window = None