[Python-checkins] python/dist/src/Lib/xml/sax __init__.py,1.15,1.16 expatreader.py,1.27,1.28
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Fri, 31 May 2002 13:46:41 -0700
Update of /cvsroot/python/python/dist/src/Lib/xml/sax
In directory usw-pr-cvs1:/tmp/cvs-serv17727/sax
Modified Files:
__init__.py expatreader.py
Log Message:
Use more string methods, remove import string
Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/__init__.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** __init__.py 31 Jul 2001 08:54:55 -0000 1.15
--- __init__.py 31 May 2002 20:46:39 -0000 1.16
***************
*** 59,70 ****
import xml.sax.expatreader
! import os, string, sys
if os.environ.has_key("PY_SAX_PARSER"):
! default_parser_list = string.split(os.environ["PY_SAX_PARSER"], ",")
del os
_key = "python.xml.sax.parser"
if sys.platform[:4] == "java" and sys.registry.containsKey(_key):
! default_parser_list = string.split(sys.registry.getProperty(_key), ",")
--- 59,70 ----
import xml.sax.expatreader
! import os, sys
if os.environ.has_key("PY_SAX_PARSER"):
! default_parser_list = os.environ["PY_SAX_PARSER"].split(",")
del os
_key = "python.xml.sax.parser"
if sys.platform[:4] == "java" and sys.registry.containsKey(_key):
! default_parser_list = sys.registry.getProperty(_key).split(",")
Index: expatreader.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/expatreader.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** expatreader.py 4 Apr 2002 19:12:31 -0000 1.27
--- expatreader.py 31 May 2002 20:46:39 -0000 1.28
***************
*** 26,30 ****
AttributesNSImpl = xmlreader.AttributesNSImpl
- import string
import weakref
--- 26,29 ----
***************
*** 221,225 ****
def start_element_ns(self, name, attrs):
! pair = string.split(name)
if len(pair) == 1:
pair = (None, name)
--- 220,224 ----
def start_element_ns(self, name, attrs):
! pair = name.split()
if len(pair) == 1:
pair = (None, name)
***************
*** 229,233 ****
newattrs = {}
for (aname, value) in attrs.items():
! apair = string.split(aname)
if len(apair) == 1:
apair = (None, aname)
--- 228,232 ----
newattrs = {}
for (aname, value) in attrs.items():
! apair = aname.split()
if len(apair) == 1:
apair = (None, aname)
***************
*** 241,245 ****
def end_element_ns(self, name):
! pair = string.split(name)
if len(pair) == 1:
pair = (None, name)
--- 240,244 ----
def end_element_ns(self, name):
! pair = name.split()
if len(pair) == 1:
pair = (None, name)