[Zope-Checkins] CVS: Zope/lib/python/Shared/DC/xml/pyexpat - __init__.py:1.3 _checkversion.py:1.4 pyexpat.py:1.4 pyexpattest.py:1.2

Martijn Pieters mj@zope.com
Wed, 14 Aug 2002 17:51:02 -0400


Update of /cvs-repository/Zope/lib/python/Shared/DC/xml/pyexpat
In directory cvs.zope.org:/tmp/cvs-serv16745/DC/xml/pyexpat

Modified Files:
	__init__.py _checkversion.py pyexpat.py pyexpattest.py 
Log Message:
Clean up indentation and trailing whitespace.


=== Zope/lib/python/Shared/DC/xml/pyexpat/__init__.py 1.2 => 1.3 ===
--- Zope/lib/python/Shared/DC/xml/pyexpat/__init__.py:1.2	Wed Nov 28 10:51:14 2001
+++ Zope/lib/python/Shared/DC/xml/pyexpat/__init__.py	Wed Aug 14 17:51:00 2002
@@ -1,13 +1,13 @@
 ##############################################################################
 #
 # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 from pyexpat import *


=== Zope/lib/python/Shared/DC/xml/pyexpat/_checkversion.py 1.3 => 1.4 ===
--- Zope/lib/python/Shared/DC/xml/pyexpat/_checkversion.py:1.3	Thu Oct 15 17:35:51 1998
+++ Zope/lib/python/Shared/DC/xml/pyexpat/_checkversion.py	Wed Aug 14 17:51:00 2002
@@ -9,8 +9,8 @@
 _URL="http://www.cwi.nl/~jack/pyexpatversion.txt"
 
 try:
-	_myverbose=VERBOSE
+    _myverbose=VERBOSE
 except NameError:
-	_myverbose=1
-	
+    _myverbose=1
+
 pyversioncheck.versioncheck(_PACKAGE, _URL, _VERSION, verbose=_myverbose)


=== Zope/lib/python/Shared/DC/xml/pyexpat/pyexpat.py 1.3 => 1.4 ===
--- Zope/lib/python/Shared/DC/xml/pyexpat/pyexpat.py:1.3	Wed Nov 28 10:51:14 2001
+++ Zope/lib/python/Shared/DC/xml/pyexpat/pyexpat.py	Wed Aug 14 17:51:00 2002
@@ -1,13 +1,13 @@
 ##############################################################################
 #
 # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE
-# 
+#
 ##############################################################################
 from dcpyexpat import *


=== Zope/lib/python/Shared/DC/xml/pyexpat/pyexpattest.py 1.1 => 1.2 ===
--- Zope/lib/python/Shared/DC/xml/pyexpat/pyexpattest.py:1.1	Tue Aug 18 09:20:07 1998
+++ Zope/lib/python/Shared/DC/xml/pyexpat/pyexpattest.py	Wed Aug 14 17:51:00 2002
@@ -5,50 +5,50 @@
 import os
 
 class Outputter:
-	def __init__(self, verbose=0):
-		self.startcount = 0
-		self.endcount = 0
-		self.cdatacount = 0
-		self.instcount = 0
-		self.verbose = verbose
-
-	def startelt(self, name, attrs):
-		self.startcount = self.startcount + 1
-		if self.verbose:
-			print 'start', name
-			for i in range(0, len(attrs), 2):
-				print 'attr', attrs[i], attrs[i+1]
-
-	def endelt(self, name):
-		self.endcount = self.endcount + 1
-		if self.verbose:
-			print 'end', name
-
-	def cdata(self, data):
-		self.cdatacount = self.cdatacount + 1
-		if self.verbose:
-			print 'cdata', data
-
-	def inst(self, target, data):
-		self.instcount = self.instcount + 1
-		if self.verbose:
-			print 'inst', target, data
+    def __init__(self, verbose=0):
+        self.startcount = 0
+        self.endcount = 0
+        self.cdatacount = 0
+        self.instcount = 0
+        self.verbose = verbose
+
+    def startelt(self, name, attrs):
+        self.startcount = self.startcount + 1
+        if self.verbose:
+            print 'start', name
+            for i in range(0, len(attrs), 2):
+                print 'attr', attrs[i], attrs[i+1]
+
+    def endelt(self, name):
+        self.endcount = self.endcount + 1
+        if self.verbose:
+            print 'end', name
+
+    def cdata(self, data):
+        self.cdatacount = self.cdatacount + 1
+        if self.verbose:
+            print 'cdata', data
+
+    def inst(self, target, data):
+        self.instcount = self.instcount + 1
+        if self.verbose:
+            print 'inst', target, data
 
 if len(sys.argv) > 1 and sys.argv[1] == '-v':
-	out = Outputter(verbose=1)
-	del sys.argv[1]
+    out = Outputter(verbose=1)
+    del sys.argv[1]
 else:
-	out = Outputter()
+    out = Outputter()
 if len(sys.argv) != 2:
-	if os.name == 'mac':
-		import macfs
-		fss, ok = macfs.StandardGetFile()
-		if not ok: sys.exit(0)
-		sys.argv.append(fss.as_pathname())
-	else:
-		print 'Usage: pyexpattest [-v] inputfile'
-		sys.exit(1)
-	
+    if os.name == 'mac':
+        import macfs
+        fss, ok = macfs.StandardGetFile()
+        if not ok: sys.exit(0)
+        sys.argv.append(fss.as_pathname())
+    else:
+        print 'Usage: pyexpattest [-v] inputfile'
+        sys.exit(1)
+
 parser = pyexpat.ParserCreate()
 parser.StartElementHandler = out.startelt
 parser.EndElementHandler = out.endelt
@@ -61,10 +61,10 @@
 
 print 'Parser returned', rv
 if rv == 0:
-	print '** Error', parser.ErrorCode
-	print '** Line', parser.ErrorLineNumber
-	print '** Column', parser.ErrorColumnNumber
-	print '** Byte', parser.ErrorByteIndex
+    print '** Error', parser.ErrorCode
+    print '** Line', parser.ErrorLineNumber
+    print '** Column', parser.ErrorColumnNumber
+    print '** Byte', parser.ErrorByteIndex
 print 'Summary of XML parser upcalls:'
 print 'start elements:', out.startcount
 print 'end elements:', out.endcount