quixote1 (1.2-4.1) direct (non packaging) changes

Summary

 demo/demo_scgi.py      |    2 +-
 fcgi.py                |    2 +-
 ptl_compile.py         |   13 ++++++++++---
 ptlc_dump.py           |    2 +-
 server/medusa_http.py  |    2 +-
 server/twisted_http.py |    2 +-
 6 files changed, 15 insertions(+), 8 deletions(-)

    
download this patch

Patch contents

--- quixote1-1.2.orig/fcgi.py
+++ quixote1-1.2/fcgi.py
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python1.5
+#! /usr/bin/python
 #------------------------------------------------------------------------
 #               Copyright (c) 1998 by Total Control Software
 #                         All Rights Reserved
--- quixote1-1.2.orig/ptlc_dump.py
+++ quixote1-1.2/ptlc_dump.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/python
 """
 Dump the information contained in a compiled PTL file.  Based on the
 dumppyc.py script in the Tools/compiler directory of the Python
--- quixote1-1.2.orig/ptl_compile.py
+++ quixote1-1.2/ptl_compile.py
@@ -1,4 +1,4 @@
-#!/www/python/bin/python
+#! /usr/bin/python
 #$HeadURL: svn+ssh://svn/repos/trunk/quixote/ptl_compile.py $
 #$Id: ptl_compile.py 25234 2004-09-30 17:36:19Z nascheme $
 
@@ -44,6 +44,12 @@
 MARKUP_CLASS = "htmltext"
 MARKUP_MANGLED_CLASS = "_q_htmltext"
 
+# Relative import level argument for "import from" statement
+if sys.version_info >= (2, 5):
+    _from_level = [0]
+else:
+    _from_level = []
+
 class TemplateTransformer(transformer.Transformer):
 
     def __init__(self, *args, **kwargs):
@@ -55,8 +61,9 @@
         # beginning of the module.
         doc = None # self.get_docstring(nodelist, symbol.file_input)
 
-        io_imp = ast.From(IO_MODULE, [(IO_CLASS, None)])
-        markup_imp = ast.From(MARKUP_MODULE, [(MARKUP_CLASS, None)])
+        io_imp = ast.From(IO_MODULE, [(IO_CLASS, None)], *_from_level)
+        markup_imp = ast.From(MARKUP_MODULE, [(MARKUP_CLASS, None)],
+                              *_from_level)
         markup_assign = ast.Assign([ast.AssName(MARKUP_MANGLED_CLASS,
                                                 OP_ASSIGN)],
                                    ast.Name(MARKUP_CLASS))
--- quixote1-1.2.orig/demo/demo_scgi.py
+++ quixote1-1.2/demo/demo_scgi.py
@@ -1,4 +1,4 @@
-#!/www/python/bin/python
+#! /usr/bin/python
 
 # Example SCGI driver script for the Quixote demo: publishes the contents of
 # the quixote.demo package.  To use this script with mod_scgi and Apache
--- quixote1-1.2.orig/server/medusa_http.py
+++ quixote1-1.2/server/medusa_http.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
 
 """quixote.server.medusa_http
 
--- quixote1-1.2.orig/server/twisted_http.py
+++ quixote1-1.2/server/twisted_http.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
 
 """
 twist -- Demo of an HTTP server built on top of Twisted Python.