[Zope-Checkins] SVN: Zope/branches/gsoc-python-2.5/lib/python/ - Cleanup DocumentTemplate module for relative imports

Sidnei da Silva sidnei at enfoldsystems.com
Mon Oct 13 17:50:06 EDT 2008


Log message for revision 92178:
   - Cleanup DocumentTemplate module for relative imports

Changed:
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_HTML.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_If.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_In.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_InSV.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Let.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Raise.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Return.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_String.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Try.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_UI.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Util.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Var.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_With.py
  D   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DocumentTemplate.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/VSEval.py
  A   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/_DocumentTemplate.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/__init__.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/html_quote.py
  U   Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/pDocumentTemplate.py
  U   Zope/branches/gsoc-python-2.5/lib/python/Shared/DC/ZRDB/sqlvar.py

-=-
Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_HTML.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_HTML.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_HTML.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -14,9 +14,9 @@
 
 $Id$"""
 
-from DT_String import String, FileMixin
-import DT_String, re
-from DT_Util import ParseError, str
+import re
+from DocumentTemplate.DT_String import String, FileMixin
+from DocumentTemplate.DT_Util import ParseError, str
 
 class dtml_re_class:
     """ This needs to be replaced before 2.4.  It's a hackaround. """
@@ -129,7 +129,7 @@
     def start(self, *args):
         return self._start
 
-class HTML(DT_String.String):
+class HTML(String):
     """HTML Document Templates
 
     HTML Document templates use HTML server-side-include syntax,

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_If.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_If.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_If.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -78,7 +78,7 @@
 __rcs_id__='$Id$'
 __version__='$Revision: 1.19 $'[11:-2]
 
-from DT_Util import ParseError, parse_params, name_param, str
+from DocumentTemplate.DT_Util import ParseError, parse_params, name_param, str
 
 class If:
     blockContinuations='else','elif'

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_In.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_In.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_In.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -333,14 +333,18 @@
 __version__='$Revision: 1.62 $'[11:-2]
 
 import sys
-from DT_Util import ParseError, parse_params, name_param, str, join_unicode
-from DT_Util import render_blocks, InstanceDict, ValidationError, Eval
-from DT_Util import simple_name, add_with_prefix
 import re
-from DT_InSV import sequence_variables, opt
-TupleType=type(())
-StringTypes = (type(''), type(u''))
 
+from DocumentTemplate.DT_Util import ParseError, parse_params, name_param
+from DocumentTemplate.DT_Util import str, join_unicode
+from DocumentTemplate.DT_Util import render_blocks, InstanceDict
+from DocumentTemplate.DT_Util import ValidationError, Eval
+from DocumentTemplate.DT_Util import simple_name, add_with_prefix
+from DocumentTemplate.DT_InSV import sequence_variables, opt
+
+TupleType = tuple
+StringTypes = (str, unicode)
+
 class InFactory:
     blockContinuations=('else',)
     name='in'

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_InSV.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_InSV.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_InSV.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -18,12 +18,13 @@
 
 from math import sqrt
 import re
-TupleType=type(())
+
 try:
     import Missing
     mv=Missing.Value
 except: mv=None
 
+TupleType = tuple
 
 class sequence_variables:
 

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Let.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Let.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Let.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -40,10 +40,11 @@
    as desired.
 '''
 
-from DT_Util import render_blocks, Eval, ParseError
-from DT_Util import str # Probably needed due to hysterical pickles.
 import re
 
+from DocumentTemplate.DT_Util import render_blocks, Eval, ParseError
+from DocumentTemplate.DT_Util import str # Probably needed due to
+                                         # hysterical pickles.
 
 class Let:
     blockContinuations=()

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Raise.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Raise.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Raise.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -27,7 +27,7 @@
 __version__='$Revision: 1.13 $'[11:-2]
 
 from zExceptions import upgradeException
-from DT_Util import parse_params, name_param, render_blocks, str
+from DocumentTemplate.DT_Util import parse_params, name_param, render_blocks, str
 
 class InvalidErrorTypeExpression(Exception):
     pass

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Return.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Return.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Return.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -12,11 +12,7 @@
 ##############################################################################
 __version__='$Revision: 1.9 $'[11:-2]
 
-try:
-    from DT_Util import parse_params, name_param
-except ImportError:
-    # See PEP-328
-    from .DT_Util import parse_params, name_param
+from DocumentTemplate.DT_Util import parse_params, name_param
 
 class ReturnTag:
     name='return'

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_String.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_String.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_String.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -16,17 +16,10 @@
 import thread
 import re
 
-try:
-    from DT_Util import ParseError, InstanceDict
-    from DT_Util import TemplateDict, render_blocks, str
-    from DT_Var import Var, Call, Comment
-    from DT_Return import ReturnTag, DTReturn
-except ImportError:
-    # See PEP-328
-    from .DT_Util import ParseError, InstanceDict
-    from .DT_Util import TemplateDict, render_blocks, str
-    from .DT_Var import Var, Call, Comment
-    from .DT_Return import ReturnTag, DTReturn
+from DocumentTemplate.DT_Util import ParseError, InstanceDict
+from DocumentTemplate.DT_Util import TemplateDict, render_blocks, str
+from DocumentTemplate.DT_Var import Var, Call, Comment
+from DocumentTemplate.DT_Return import ReturnTag, DTReturn
 
 _marker = []  # Create a new marker object.
 

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Try.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Try.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Try.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -13,9 +13,9 @@
 
 import  sys, traceback
 from cStringIO import StringIO
-from DT_Util import ParseError, parse_params, render_blocks
-from DT_Util import namespace, InstanceDict
-from DT_Return import DTReturn
+from DocumentTemplate.DT_Util import ParseError, parse_params, render_blocks
+from DocumentTemplate.DT_Util import namespace, InstanceDict
+from DocumentTemplate.DT_Return import DTReturn
 
 class Try:
     """Zope DTML Exception handling

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_UI.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_UI.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_UI.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -15,7 +15,7 @@
 $Id$'''
 __version__='$Revision: 1.15 $'[11:-2]
 
-from DT_HTML import HTML
+from DocumentTemplate.DT_HTML import HTML
 
 FactoryDefaultString="Factory Default"
 

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Util.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Util.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Util.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -16,22 +16,13 @@
 
 import re
 
-try:
-    # for import by other modules, dont remove!
-    from html_quote import html_quote, ustr
+# for import by other modules, dont remove!
+from DocumentTemplate.html_quote import html_quote, ustr
 
-    from cDocumentTemplate import InstanceDict, TemplateDict
-    from cDocumentTemplate import render_blocks, safe_callable
-    from cDocumentTemplate import join_unicode
-except ImportError:
-    # See PEP-328: 
-    # for import by other modules, dont remove!
-    from .html_quote import html_quote, ustr
+from DocumentTemplate.cDocumentTemplate import InstanceDict, TemplateDict
+from DocumentTemplate.cDocumentTemplate import render_blocks, safe_callable
+from DocumentTemplate.cDocumentTemplate import join_unicode
 
-    from .cDocumentTemplate import InstanceDict, TemplateDict
-    from .cDocumentTemplate import render_blocks, safe_callable
-    from .cDocumentTemplate import join_unicode
-
 from RestrictedPython.Guards import safe_builtins
 from RestrictedPython.Utilities import utility_builtins
 from RestrictedPython.Eval import RestrictionCapableEval

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Var.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Var.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_Var.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -159,13 +159,9 @@
 from cgi import escape
 from urllib import quote, quote_plus, unquote, unquote_plus
 
-try:
-    # for import by other modules, dont remove!
-    from html_quote import html_quote
-    from DT_Util import parse_params, name_param, str, ustr
-except ImportError:
-    from .html_quote import html_quote
-    from .DT_Util import parse_params, name_param, str, ustr
+# for import by other modules, dont remove!
+from DocumentTemplate.html_quote import html_quote
+from DocumentTemplate.DT_Util import parse_params, name_param, str, ustr
 
 from Acquisition import aq_base
 from ZPublisher.TaintedString import TaintedString

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_With.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_With.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DT_With.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -36,8 +36,10 @@
 __rcs_id__='$Id$'
 __version__='$Revision: 1.15 $'[11:-2]
 
-from DT_Util import parse_params, name_param, InstanceDict, render_blocks, str
-from DT_Util import TemplateDict
+from DocumentTemplate.DT_Util import parse_params, name_param
+from DocumentTemplate.DT_Util import InstanceDict, render_blocks, str
+from DocumentTemplate.DT_Util import TemplateDict
+
 class With:
     blockContinuations=()
     name='with'

Deleted: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DocumentTemplate.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DocumentTemplate.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DocumentTemplate.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -1,120 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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
-#
-##############################################################################
-'''Document templates with fill-in fields
-
-Document templates provide for creation of textual documents, such as
-HTML pages, from template source by inserting data from python objects
-and name-spaces.
-
-When a document template is created, a collection of default values to
-be inserted may be specified with a mapping object and with keyword
-arguments.
-
-A document templated may be called to create a document with values
-inserted.  When called, an instance, a mapping object, and keyword
-arguments may be specified to provide values to be inserted.  If an
-instance is provided, the document template will try to look up values
-in the instance using getattr, so inheritence of values is supported.
-If an inserted value is a function, method, or class, then an attempt
-will be made to call the object to obtain values.  This allows
-instance methods to be included in documents.
-
-Document templates masquerade as functions, so the python object
-publisher (Bobo) will call templates that are stored as instances of
-published objects. Bobo will pass the object the template was found in
-and the HTTP request object.
-
-Two source formats are supported:
-
-   Extended Python format strings (EPFS) --
-      This format is based on the insertion by name format strings
-      of python with additional format characters, '[' and ']' to
-      indicate block boundaries.  In addition, parameters may be
-      used within formats to control how insertion is done.
-
-      For example:
-
-         %%(date fmt=DayOfWeek upper)s
-
-      causes the contents of variable 'date' to be inserted using
-      custom format 'DayOfWeek' and with all lower case letters
-      converted to upper case.
-
-   HTML --
-      This format uses HTML server-side-include syntax with
-      commands for inserting text. Parameters may be included to
-      customize the operation of a command.
-
-      For example:
-
-         <!--#var total fmt=12.2f-->
-
-      is used to insert the variable 'total' with the C format
-      '12.2f'.
-
-Document templates support conditional and sequence insertion
-
-    Document templates extend python string substitition rules with a
-    mechanism that allows conditional insertion of template text and that
-    allows sequences to be inserted with element-wise insertion of
-    template text.
-
-Access Control
-
-    Document templates provide a basic level of access control by
-    preventing access to names beginning with an underscore.
-    Additional control may be provided by providing document templates
-    with a 'guarded_getattr' and 'guarded_getitem' method.  This would
-    typically be done by subclassing one or more of the DocumentTemplate
-    classes.
-
-    If provided, the the 'guarded_getattr' method will be called when
-    objects are accessed as instance attributes or when they are
-    accessed through keyed access in an expression.
-
-Document Templates may be created 4 ways:
-
-    DocumentTemplate.String -- Creates a document templated from a
-        string using an extended form of python string formatting.
-
-    DocumentTemplate.File -- Creates a document templated bound to a
-        named file using an extended form of python string formatting.
-        If the object is pickled, the file name, rather than the file
-        contents is pickled.  When the object is unpickled, then the
-        file will be re-read to obtain the string.  Note that the file
-        will not be read until the document template is used the first
-        time.
-
-    DocumentTemplate.HTML -- Creates a document templated from a
-        string using HTML server-side-include rather than
-        python-format-string syntax.
-
-    DocumentTemplate.HTMLFile -- Creates an HTML document template
-        from a named file.
-
-'''
-
-
-__version__='$Revision: 1.14 $'[11:-2]
-
-ParseError='Document Template Parse Error'
-
-try:
-    from DT_String import String, File
-    from DT_HTML import HTML, HTMLFile, HTMLDefault
-except ImportError:
-    # See PEP-328
-    from .DT_String import String, File
-    from .DT_HTML import HTML, HTMLFile, HTMLDefault
-
-# import DT_UI # Install HTML editing

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/VSEval.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/VSEval.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/VSEval.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -1,6 +1,6 @@
 # alias module for backwards compatibility
 
-from DT_Util import Eval
+from DocumentTemplate.DT_Util import Eval
 
 def careful_mul(env, *factors):
     r = 1

Copied: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/_DocumentTemplate.py (from rev 92168, Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/DocumentTemplate.py)
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/_DocumentTemplate.py	                        (rev 0)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/_DocumentTemplate.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -0,0 +1,114 @@
+##############################################################################
+#
+# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (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
+#
+##############################################################################
+'''Document templates with fill-in fields
+
+Document templates provide for creation of textual documents, such as
+HTML pages, from template source by inserting data from python objects
+and name-spaces.
+
+When a document template is created, a collection of default values to
+be inserted may be specified with a mapping object and with keyword
+arguments.
+
+A document templated may be called to create a document with values
+inserted.  When called, an instance, a mapping object, and keyword
+arguments may be specified to provide values to be inserted.  If an
+instance is provided, the document template will try to look up values
+in the instance using getattr, so inheritence of values is supported.
+If an inserted value is a function, method, or class, then an attempt
+will be made to call the object to obtain values.  This allows
+instance methods to be included in documents.
+
+Document templates masquerade as functions, so the python object
+publisher (Bobo) will call templates that are stored as instances of
+published objects. Bobo will pass the object the template was found in
+and the HTTP request object.
+
+Two source formats are supported:
+
+   Extended Python format strings (EPFS) --
+      This format is based on the insertion by name format strings
+      of python with additional format characters, '[' and ']' to
+      indicate block boundaries.  In addition, parameters may be
+      used within formats to control how insertion is done.
+
+      For example:
+
+         %%(date fmt=DayOfWeek upper)s
+
+      causes the contents of variable 'date' to be inserted using
+      custom format 'DayOfWeek' and with all lower case letters
+      converted to upper case.
+
+   HTML --
+      This format uses HTML server-side-include syntax with
+      commands for inserting text. Parameters may be included to
+      customize the operation of a command.
+
+      For example:
+
+         <!--#var total fmt=12.2f-->
+
+      is used to insert the variable 'total' with the C format
+      '12.2f'.
+
+Document templates support conditional and sequence insertion
+
+    Document templates extend python string substitition rules with a
+    mechanism that allows conditional insertion of template text and that
+    allows sequences to be inserted with element-wise insertion of
+    template text.
+
+Access Control
+
+    Document templates provide a basic level of access control by
+    preventing access to names beginning with an underscore.
+    Additional control may be provided by providing document templates
+    with a 'guarded_getattr' and 'guarded_getitem' method.  This would
+    typically be done by subclassing one or more of the DocumentTemplate
+    classes.
+
+    If provided, the the 'guarded_getattr' method will be called when
+    objects are accessed as instance attributes or when they are
+    accessed through keyed access in an expression.
+
+Document Templates may be created 4 ways:
+
+    DocumentTemplate.String -- Creates a document templated from a
+        string using an extended form of python string formatting.
+
+    DocumentTemplate.File -- Creates a document templated bound to a
+        named file using an extended form of python string formatting.
+        If the object is pickled, the file name, rather than the file
+        contents is pickled.  When the object is unpickled, then the
+        file will be re-read to obtain the string.  Note that the file
+        will not be read until the document template is used the first
+        time.
+
+    DocumentTemplate.HTML -- Creates a document templated from a
+        string using HTML server-side-include rather than
+        python-format-string syntax.
+
+    DocumentTemplate.HTMLFile -- Creates an HTML document template
+        from a named file.
+
+'''
+
+
+__version__='$Revision: 1.14 $'[11:-2]
+
+from DocumentTemplate.DT_Raise import ParseError
+from DocumentTemplate.DT_String import String, File
+from DocumentTemplate.DT_HTML import HTML, HTMLFile, HTMLDefault
+
+# import DT_UI # Install HTML editing


Property changes on: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/_DocumentTemplate.py
___________________________________________________________________
Name: cvs2svn:cvs-rev
   + 1.14
Name: svn:mergeinfo
   + 
Name: svn:eol-style
   + native

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/__init__.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/__init__.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/__init__.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -18,4 +18,5 @@
 $Id$'''
 __version__='$Revision: 1.18 $'[11:-2]
 
-from DocumentTemplate import String, File, HTML, HTMLDefault, HTMLFile
+from DocumentTemplate.DT_String import String, File
+from DocumentTemplate.DT_HTML import HTML, HTMLDefault, HTMLFile

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/html_quote.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/html_quote.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/html_quote.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -1,7 +1,7 @@
 # split off into its own module for aliasing without circrefs
 
 from cgi import escape
-from ustr import ustr
+from DocumentTemplate.ustr import ustr
 
 def html_quote(v, name='(Unknown name)', md={}):
     return escape(ustr(v), 1)

Modified: Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/pDocumentTemplate.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/pDocumentTemplate.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/DocumentTemplate/pDocumentTemplate.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -20,7 +20,7 @@
 
 import sys, types
 from types import StringType, UnicodeType, TupleType
-from ustr import ustr
+from DocumentTemplate.ustr import ustr
 
 import warnings
 warnings.warn('pDocumentTemplate is not longer in active use. '

Modified: Zope/branches/gsoc-python-2.5/lib/python/Shared/DC/ZRDB/sqlvar.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/Shared/DC/ZRDB/sqlvar.py	2008-10-13 21:46:29 UTC (rev 92177)
+++ Zope/branches/gsoc-python-2.5/lib/python/Shared/DC/ZRDB/sqlvar.py	2008-10-13 21:50:06 UTC (rev 92178)
@@ -61,10 +61,11 @@
 
 from DocumentTemplate.DT_Util import ParseError, parse_params, name_param
 from string import find, split, join, atoi, atof
-StringType=type('')
 
-str=__builtins__['str']
+StringType = str
 
+str = __builtins__['str']
+
 class SQLVar:
     name='sqlvar'
 



More information about the Zope-Checkins mailing list