[Python-checkins] CVS: python/dist/src/Doc/tools/sgmlconv esistools.py,1.7,1.8 latex2esis.py,1.25,1.26
Fred L. Drake
fdrake@users.sourceforge.net
Fri, 28 Sep 2001 09:26:15 -0700
Update of /cvsroot/python/python/dist/src/Doc/tools/sgmlconv
In directory usw-pr-cvs1:/tmp/cvs-serv462
Modified Files:
esistools.py latex2esis.py
Log Message:
Convert most uses of the string module to string methods.
(string.join() lives!)
Index: esistools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/esistools.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** esistools.py 2001/04/21 06:01:53 1.7
--- esistools.py 2001/09/28 16:26:13 1.8
***************
*** 2,6 ****
import re
- import string
import xml.dom.pulldom
--- 2,5 ----
***************
*** 183,187 ****
if handler:
if ' ' in data:
! target, data = string.split(data, None, 1)
else:
target, data = data, ""
--- 182,186 ----
if handler:
if ' ' in data:
! target, data = data.split(None, 1)
else:
target, data = data, ""
Index: latex2esis.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/latex2esis.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** latex2esis.py 2001/09/25 20:57:36 1.25
--- latex2esis.py 2001/09/28 16:26:13 1.26
***************
*** 110,114 ****
self.ofp = ofp
self.table = table
! self.line = string.join(map(string.rstrip, ifp.readlines()), "\n")
self.preamble = 1
--- 110,114 ----
self.ofp = ofp
self.table = table
! self.line = string.join([s.rstrip() for s in ifp.readlines()], "\n")
self.preamble = 1
***************
*** 171,175 ****
if entry.verbatim:
# magic case!
! pos = string.find(line, "\\end{%s}" % macroname)
text = line[m.end(1):pos]
stack.append(entry.name)
--- 171,175 ----
if entry.verbatim:
# magic case!
! pos = line.find("\\end{%s}" % macroname)
text = line[m.end(1):pos]
stack.append(entry.name)
***************
*** 411,415 ****
def skip_white(line):
while line and line[0] in " %\n\t\r":
! line = string.lstrip(line[1:])
return line
--- 411,415 ----
def skip_white(line):
while line and line[0] in " %\n\t\r":
! line = line[1:].lstrip()
return line
***************
*** 462,466 ****
if attrs.has_key("outputname"):
self.__current.outputname = attrs.get("outputname")
! self.__current.endcloses = string.split(attrs.get("endcloses", ""))
def end_environment(self):
self.end_macro()
--- 462,466 ----
if attrs.has_key("outputname"):
self.__current.outputname = attrs.get("outputname")
! self.__current.endcloses = attrs.get("endcloses", "").split()
def end_environment(self):
self.end_macro()
***************
*** 469,473 ****
name = attrs["name"]
self.__current = TableEntry(name)
! self.__current.closes = string.split(attrs.get("closes", ""))
if attrs.has_key("outputname"):
self.__current.outputname = attrs.get("outputname")
--- 469,473 ----
name = attrs["name"]
self.__current = TableEntry(name)
! self.__current.closes = attrs.get("closes", "").split()
if attrs.has_key("outputname"):
self.__current.outputname = attrs.get("outputname")