[Zope-Checkins] CVS: Zope2 - DT_HTML.py:1.24.84.4 DT_InSV.py:1.18.24.2 DT_Let.py:1.6.108.2 DT_String.py:1.39.52.7 DT_Util.py:1.72.16.2 DT_Var.py:1.37.78.2

Andreas Jung andreas@dhcp165.digicool.com
Mon, 23 Apr 2001 12:18:15 -0400


Update of /cvs-repository/Zope2/lib/python/DocumentTemplate
In directory yetix:/work/sandboxes/ajung-2_4-ts_regex-exterminiation-branch/lib/python/DocumentTemplate

Modified Files:
      Tag: ajung-2_4-ts_regex-exterminiation-branch
	DT_HTML.py DT_InSV.py DT_Let.py DT_String.py DT_Util.py 
	DT_Var.py 
Log Message:
introduced r".." notation for all regexes



--- Updated File DT_HTML.py in package Zope2 --
--- DT_HTML.py	2001/04/19 21:49:33	1.24.84.3
+++ DT_HTML.py	2001/04/23 16:18:12	1.24.84.4
@@ -94,10 +94,10 @@
 class dtml_re_class:
     """ This needs to be replaced before 2.4.  It's a hackaround. """
     def search(self, text, start=0,
-               name_match=re.compile('[\0- ]*[a-zA-Z]+[\0- ]*').match,
-               end_match=re.compile('[\0- ]*(/\|end)', re.I).match,
-               start_search=re.compile('[<&]').search,
-               ent_name=re.compile('[-a-zA-Z0-9_.]+').match,
+               name_match=re.compile(r'[\0- ]*[a-zA-Z]+[\0- ]*').match,
+               end_match=re.compile(r'[\0- ]*(/\|end)', re.I).match,
+               start_search=re.compile(r'[<&]').search,
+               ent_name=re.compile(r'[-a-zA-Z0-9_.]+').match,
                find=find,
                strip=strip,
                replace=replace,

--- Updated File DT_InSV.py in package Zope2 --
--- DT_InSV.py	2001/04/19 17:06:43	1.18.24.1
+++ DT_InSV.py	2001/04/23 16:18:12	1.18.24.2
@@ -200,7 +200,7 @@
         return l
 
     def query(self, *ignored):
-        print 'query',ignored
+        
         if self.start_name_re is None: raise KeyError, 'sequence-query'
         query_string=self.query_string
         while query_string and query_string[:1] in '?&':
@@ -211,7 +211,7 @@
             query_string='&%s&' % query_string                  
             reg=self.start_name_re
 
-            if type(reg)==type(re.compile("")):
+            if type(reg)==type(re.compile(r"")):
                 mo = reg.search(query_string)
                 if mo is not None:
                     v = mo.group(0)
@@ -228,7 +228,7 @@
             query_string='?'+query_string[1:]
         else: query_string='?'
         self.data['sequence-query']=query_string
-        print 'query-return:',query_string
+        
         return query_string
         
 

--- Updated File DT_Let.py in package Zope2 --
--- DT_Let.py	2001/04/19 17:37:55	1.6.108.1
+++ DT_Let.py	2001/04/23 16:18:13	1.6.108.2
@@ -155,9 +155,9 @@
             result=None,
             tag='let',
             parmre=re.compile(
-                '([\0- ]*([^\0- =\"]+)=([^\0- =\"]+))'),
+                r'([\0- ]*([^\0- =\"]+)=([^\0- =\"]+))'),
             qparmre=re.compile(
-                '([\0- ]*([^\0- =\"]+)="([^"]*)\")'),
+                r'([\0- ]*([^\0- =\"]+)="([^"]*)\")'),
             **parms):
 
     result=result or []

--- Updated File DT_String.py in package Zope2 --
--- DT_String.py	2001/04/20 12:38:50	1.39.52.6
+++ DT_String.py	2001/04/23 16:18:13	1.39.52.7
@@ -4,7 +4,7 @@
 # Zope Public License (ZPL) Version 1.0
 # -------------------------------------
 # 
-# Copyright (c) Digital Creations.  All rights reserved.
+# Copyright (c) Digital Ceeations.  All rights reserved.
 # 
 # This license has been certified as Open Source(tm).
 # 
@@ -156,7 +156,7 @@
     tagre__roles__=()
     def tagre(self):
         return re.compile(
-            '%('                                     # beginning
+            r'%('                                     # beginning
             '(?P<name>[a-zA-Z0-9_/.-]+)'                       # tag name
             '('
             '[\0- ]+'                                # space after tag name
@@ -259,7 +259,7 @@
         return result
 
     skip_eol__roles__=()
-    def skip_eol(self, text, start, eol=re.compile('[ \t]*\n')):
+    def skip_eol(self, text, start, eol=re.compile(r'[ \t]*\n')):
         # if block open is followed by newline, then skip past newline
         mo =eol.match(text,start)
         if mo is not None: 

--- Updated File DT_Util.py in package Zope2 --
--- DT_Util.py	2001/04/19 18:35:54	1.72.16.1
+++ DT_Util.py	2001/04/23 16:18:13	1.72.16.2
@@ -451,13 +451,13 @@
                  result=None,
                  tag='',
                  unparmre=re.compile(
-                     '([\0- ]*([^\0- =\"]+))'),
+                     r'([\0- ]*([^\0- =\"]+))'),
                  qunparmre=re.compile(
-                     '([\0- ]*("[^"]*"))'),
+                     r'([\0- ]*("[^"]*"))'),
                  parmre=re.compile(
-                     '([\0- ]*([^\0- =\"]+)=([^\0- =\"]+))'),
+                     r'([\0- ]*([^\0- =\"]+)=([^\0- =\"]+))'),
                  qparmre=re.compile(
-                     '([\0- ]*([^\0- =\"]+)="([^"]*)\")'),
+                     r'([\0- ]*([^\0- =\"]+)="([^"]*)\")'),
                  **parms):
 
     """Parse tag parameters

--- Updated File DT_Var.py in package Zope2 --
--- DT_Var.py	2001/04/18 16:40:26	1.37.78.1
+++ DT_Var.py	2001/04/23 16:18:14	1.37.78.2
@@ -374,7 +374,7 @@
 
 def thousands_commas(v, name='(Unknown name)', md={},
                      thou=re.compile(
-                         "([0-9])([0-9][0-9][0-9]([,.]\|$))").search):
+                         r"([0-9])([0-9][0-9][0-9]([,.]\|$))").search):
     v=str(v)
     vl=split(v,'.')
     if not vl: return v