De-string-module-ification.

This commit is contained in:
Barry Warsaw 2001-07-10 21:44:24 +00:00
parent 60e1886e87
commit 8e4fa072f7
2 changed files with 11 additions and 10 deletions

View file

@ -6,7 +6,6 @@ It is used to bring up other windows.
import sys
import os
import string
from Tkinter import *
import tkMessageBox
import tkFileDialog
@ -221,9 +220,9 @@ class Helpwin:
fp = open(readmefile)
contents = fp.read()
# wax the last page, it contains Emacs cruft
i = string.rfind(contents, '\f')
i = contents.rfind('\f')
if i > 0:
contents = string.rstrip(contents[:i])
contents = contents[:i].rstrip()
finally:
if fp:
fp.close()
@ -258,11 +257,11 @@ class PopupViewer:
self.__root = root
self.__menutext = module.ADDTOVIEW
# find the underline character
underline = string.find(module.ADDTOVIEW, '%')
underline = module.ADDTOVIEW.find('%')
if underline == -1:
underline = 0
else:
self.__menutext = string.replace(module.ADDTOVIEW, '%', '', 1)
self.__menutext = module.ADDTOVIEW.replace('%', '', 1)
self.__underline = underline
self.__window = None