[Checkins] SVN: zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py made zope.app.pythonpage work with Python2.5

nikhil n nikhil.n.n at gmail.com
Sat Aug 18 11:51:17 EDT 2007


Log message for revision 78946:
  made zope.app.pythonpage work with Python2.5

Changed:
  U   zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py

-=-
Modified: zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py
===================================================================
--- zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py	2007-08-18 15:47:03 UTC (rev 78945)
+++ zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py	2007-08-18 15:51:16 UTC (rev 78946)
@@ -130,11 +130,15 @@
       # of the source correctly. So we construct an information string by hand.
 
       >>> def print_err(err):
+      ...     err.__dict__['msg'] = err.msg
+      ...     err.__dict__['filename'] = err.filename
+      ...     err.__dict__['lineno'] = err.lineno
+      ...     err.__dict__['offset'] = err.offset
       ...     print ('%(msg)s, %(filename)s, line %(lineno)i, offset %(offset)i'
       ...           % err.__dict__)
       ...
       >>> try:
-      ...     pp.setSource(u"'''<html>...</html>") #'''"
+      ...     pp.setSource(u"'''<html>..</html>") #'''"
       ... except SyntaxError, err:
       ...     print_err(err)
       EOF while scanning triple-quoted string, /pp, line 1, offset 19



More information about the Checkins mailing list