[Zope-Checkins] CVS: Zope/lib/python/Shared/DC/xml - __init__.py:1.3 ppml.py:1.17 xmllib.py:1.4 xyap.py:1.5

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


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

Modified Files:
	__init__.py ppml.py xmllib.py xyap.py 
Log Message:
Clean up indentation and trailing whitespace.


=== Zope/lib/python/Shared/DC/xml/__init__.py 1.2 => 1.3 ===
--- Zope/lib/python/Shared/DC/xml/__init__.py:1.2	Wed Nov 28 10:51:14 2001
+++ Zope/lib/python/Shared/DC/xml/__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
-# 
+#
 ##############################################################################
 __version__='$Revision$'[11:-2]


=== Zope/lib/python/Shared/DC/xml/ppml.py 1.16 => 1.17 ===
--- Zope/lib/python/Shared/DC/xml/ppml.py:1.16	Wed Nov 28 10:51:14 2001
+++ Zope/lib/python/Shared/DC/xml/ppml.py	Wed Aug 14 17:51:00 2002
@@ -1,14 +1,14 @@
 ##############################################################################
 #
 # 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
-# 
+#
 ##############################################################################
 """Provide conversion between Python pickles and XML
 
@@ -65,7 +65,7 @@
             new=string.join(map(lambda s: reprs2.get(s,s), new), '')
     return encoding, new
 
-#  Function unconvert takes a encoding and a string and 
+#  Function unconvert takes a encoding and a string and
 #  returns the original string
 
 def unconvert(encoding,S):
@@ -96,7 +96,7 @@
 
 class Global:
 
-    def __init__(self, module, name): 
+    def __init__(self, module, name):
         self.module=module
         self.name=name
 
@@ -111,7 +111,7 @@
 
     def __init__(self, v):
         self._v=v
-    
+
     def value(self): return self._v
 
     def __str__(self, indent=0):
@@ -130,7 +130,7 @@
     return v[1:-1]
 
 class Int(Scalar): pass
-class Long(Scalar): 
+class Long(Scalar):
     def value(self):
         result = str(self._v)
         if result[-1:] == 'L':
@@ -155,7 +155,7 @@
 class Wrapper:
 
     def __init__(self, v): self._v=v
-    
+
     def value(self): return self._v
 
     def __str__(self, indent=0):
@@ -196,7 +196,7 @@
                 '%s<item>\n'
                 '%s'
                 '%s'
-                '%s</item>\n' 
+                '%s</item>\n'
                 %
                 (ind,
                  Key(i[0]).__str__(indent),
@@ -208,7 +208,7 @@
 
 class Sequence(Collection):
 
-    def __init__(self, v=None): 
+    def __init__(self, v=None):
         if not v: v=[]
         self._subs=v
 
@@ -238,7 +238,7 @@
     def __str__(self, indent=0):
         v=self._v
         name=string.lower(self.__class__.__name__)
-        return '%s<%s id="%s"/>\n' % (' '*indent,name,v) 
+        return '%s<%s id="%s"/>\n' % (' '*indent,name,v)
 
 Get=Reference
 
@@ -282,7 +282,7 @@
     def load_binint2(self):
         self.append(Int(mloads('i' + self.read(2) + '\000\000')))
     dispatch[BININT2] = load_binint2
- 
+
     def load_long(self):
         self.append(Long(string.atol(self.readline()[:-1], 0)))
     dispatch[LONG] = load_long
@@ -358,11 +358,11 @@
         k = self.marker()
         klass = stack[k + 1]
         del stack[k + 1]
-        args = Tuple(stack[k + 1:]) 
+        args = Tuple(stack[k + 1:])
         del stack[k:]
         value=Object(klass,args)
         self.append(value)
-    dispatch[OBJ] = load_obj                
+    dispatch[OBJ] = load_obj
 
     def load_global(self):
         module = self.readline()[:-1]
@@ -422,13 +422,13 @@
 
 
 class NoBlanks:
-    
+
     def handle_data(self, data):
         if string.strip(data): self.append(data)
 
 def name(self, tag, data, join=string.join, strip=string.strip):
     return strip(join(data[2:],''))
-    
+
 def start_pickle(self, tag, attrs):
     self._pickleids={}
     return [tag,attrs]
@@ -490,7 +490,7 @@
         'state': lambda self, tag, data: data[2],
         'klass': lambda self, tag, data: data[2],
         }
-    
+
 def save_int(self, tag, data):
     binary=self.binary
     if binary:
@@ -584,7 +584,7 @@
 
 def save_reference(self, tag, data):
     binary=self.binary
-    a=data[1]    
+    a=data[1]
     id=a['id']
     prefix=string.rfind(id,'.')
     if prefix>=0: id=id[prefix+1:]
@@ -600,7 +600,7 @@
             get='j'
         v=get+id
     else: v=get+id+'\012'
-    
+
     return v
 
 def save_object(self, tag, data):
@@ -787,4 +787,3 @@
 
 if __name__ == '__main__':
     test()
-


=== Zope/lib/python/Shared/DC/xml/xmllib.py 1.3 => 1.4 ===
--- Zope/lib/python/Shared/DC/xml/xmllib.py:1.3	Thu May  4 09:32:06 2000
+++ Zope/lib/python/Shared/DC/xml/xmllib.py	Wed Aug 14 17:51:00 2002
@@ -165,9 +165,9 @@
                 break
             res = interesting.search(rawdata, i)
             if res:
-                    j = res.start(0)
+                j = res.start(0)
             else:
-                    j = n
+                j = n
             if i < j:
                 if self.__at_start:
                     self.syntax_error('illegal data at start of file')


=== Zope/lib/python/Shared/DC/xml/xyap.py 1.4 => 1.5 ===
--- Zope/lib/python/Shared/DC/xml/xyap.py:1.4	Fri Jun  1 22:50:43 2001
+++ Zope/lib/python/Shared/DC/xml/xyap.py	Wed Aug 14 17:51:00 2002
@@ -62,7 +62,7 @@
         append(top)
 
 class NoBlanks:
-    
+
     def handle_data(self, data):
         if string.strip(data): self.append(data)
 
@@ -78,12 +78,12 @@
 def tuplef(self, tag, data): return tuple(data[2:])
 
 class XYap(xyap, xmllib.XMLParser):
-        def __init__(self):
-            xmllib.XMLParser.__init__(self)
-            top=[]
-            self._stack=_stack=[top]
-            self.push=_stack.append
-            self.append=top.append
+    def __init__(self):
+        xmllib.XMLParser.__init__(self)
+        top=[]
+        self._stack=_stack=[top]
+        self.push=_stack.append
+        self.append=top.append
 
 class xmlrpc(NoBlanks, XYap, xmllib.XMLParser):
     end_handlers={
@@ -117,7 +117,7 @@
         }
 
 def test():
-    
+
     data="""<?xml version="1.0"?>
     <methodCall>
              <methodName>examples.getStateName
@@ -154,7 +154,7 @@
                 </params>
              </methodCall>
              """
-    
+
     data=string.split(data,'\n')
     r=[]
     for C in XYap, xmlrpc:
@@ -163,9 +163,8 @@
             p.feed(l)
         p.close()
         r.append(p._stack)
-    
+
     return r
 
 
 if __name__=='__main__': print test()
-