<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-3945</id>
	<title>Nabble - cheetahtemplate-discuss</title>
	<updated>2009-12-02T15:03:45Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/cheetahtemplate-discuss-f3945.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cheetahtemplate-discuss-f3945.html" />
	<subtitle type="html">Mailing list archive for cheetahtemplate-discuss</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26618195</id>
	<title>Re: Create html buttons dynamically</title>
	<published>2009-12-02T15:03:45Z</published>
	<updated>2009-12-02T15:03:45Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;On Wed, 02 Dec 2009, V?ry &amp;nbsp;D?niel wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I was searching the archive but couldn't find the answer to my question:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'd like to create Buttons in my html form dynamically. I have a list variable, which has the button names, and I'd like to create the buttons based on that. The amount of the list items would give the amount of buttons to create, and the name of the list items would be the names of the buttons. I assume that a for-loop would be the best shot, but I'm not sure about the syntax.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any help would be greatly appreciated,
&lt;br&gt;&lt;br&gt;Yeah, a #for loop is likely you're best candidate:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; #for name in $buttons
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type=&amp;quot;button&amp;quot; name=&amp;quot;$name&amp;quot; value=&amp;quot;$name&amp;quot;/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; #end for
&lt;br&gt;&lt;br&gt;That will cause those buttons to be output inline in the template where the
&lt;br&gt;forloop is.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;Jabber: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26618195&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rtyler@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Join us December 9, 2009 for the Red Hat Virtual Experience,
&lt;br&gt;a free event focused on virtualization and cloud computing. 
&lt;br&gt;Attend in-depth sessions from your desk. Your couch. Anywhere.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/redhat-sfdev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/redhat-sfdev2dev&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26618195&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (205 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26618195/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Create-html-buttons-dynamically-tp26616538p26618195.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26616538</id>
	<title>Create html buttons dynamically</title>
	<published>2009-12-02T13:11:03Z</published>
	<updated>2009-12-02T13:11:03Z</updated>
	<author>
		<name>Váry  Dániel</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I was searching the archive but couldn't find the answer to my question:
&lt;br&gt;&lt;br&gt;I'd like to create Buttons in my html form dynamically. I have a list variable, which has the button names, and I'd like to create the buttons based on that. The amount of the list items would give the amount of buttons to create, and the name of the list items would be the names of the buttons. I assume that a for-loop would be the best shot, but I'm not sure about the syntax.
&lt;br&gt;&lt;br&gt;Any help would be greatly appreciated,
&lt;br&gt;&lt;br&gt;Dan
&lt;br&gt;&lt;br&gt;&amp;lt;!-- PATH STAT NUMBER ERROR --&amp;gt;
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Join us December 9, 2009 for the Red Hat Virtual Experience,
&lt;br&gt;a free event focused on virtualization and cloud computing. 
&lt;br&gt;Attend in-depth sessions from your desk. Your couch. Anywhere.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/redhat-sfdev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/redhat-sfdev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26616538&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Create-html-buttons-dynamically-tp26616538p26616538.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26510161</id>
	<title>Re: encoding problem</title>
	<published>2009-11-25T02:02:36Z</published>
	<updated>2009-11-25T02:02:36Z</updated>
	<author>
		<name>Juan Fiol</name>
	</author>
	<content type="html">Hi, thanks for the prompt answer. I have almost no experience with Cheetah. I am currently using it through tahchee and only for a small set of webpages. So, I am not sure even if my diagnosis is correct.
&lt;br&gt;&lt;br&gt;The problem appears when I do not have the encoding line in both *compiled* templates that used accented words or words like &amp;quot;Español&amp;quot; and in *uncompiled* templates that included accented words (in spanish).
&lt;br&gt;&lt;br&gt;I've tried including the encoding line in both without success until I changed re.match to re.search
&lt;br&gt;I could send my templates, or simplified versions of them, but they are really for use with tahchee. It probably would be better if I can generate a couple of examples in cheetah templates. However, I don't even know the difference or how to use cheetah directly yet. Also, I am rather busy these days, so it can take me three or four days.
&lt;br&gt;&lt;br&gt;After changed the file Compiler.py and including the encoding line in all relevant files everything worked well.
&lt;br&gt;&lt;br&gt;A python trace (error message) corresponds to cheetah not finding the encoding. It follows an example:
&lt;br&gt;+++++++++++++++++++++++++++++++++++++++++++++++
&lt;br&gt;&amp;nbsp; File &amp;quot;/usr/lib/python2.6/site-packages/Cheetah/Compiler.py&amp;quot;, line 1588, in __init__
&lt;br&gt;&amp;nbsp; &amp;nbsp; source = unicode(source)
&lt;br&gt;UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 84: ordinal not in range(128)
&lt;br&gt;make: *** [local] Error 1
&lt;br&gt;+++++++++++++++++++++++++++++++++++++++++++++++
&lt;br&gt;&lt;br&gt;Cheers, Juan
&lt;br&gt;--- On Wed, 11/25/09, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26510161&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26510161&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26510161&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26510161&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Subject: Re: [Cheetahtemplate-discuss] encoding problem
&lt;br&gt;&amp;gt; To: &amp;quot;Juan Fiol&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26510161&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;fiolj@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; Cc: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26510161&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Date: Wednesday, November 25, 2009, 3:03 AM
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Tue, 24 Nov 2009, Juan Fiol wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi, using versions 2.2.2 and 2.4.0 in gentoo I found
&lt;br&gt;&amp;gt; that previous working templates (with version 2.0.1) do not
&lt;br&gt;&amp;gt; longer work. The error point out to encoding (ascii not
&lt;br&gt;&amp;gt; being good for some chars). After posting to tahchee mail
&lt;br&gt;&amp;gt; list, I included encoding directives like suggested in the
&lt;br&gt;&amp;gt; manual:
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; #encoding: UTF-8
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Are you referring to the *compiled* templates or the
&lt;br&gt;&amp;gt; uncompiled templates? If
&lt;br&gt;&amp;gt; it's the former than I might need to bump the latest
&lt;br&gt;&amp;gt; compatible version tuple.
&lt;br&gt;&amp;gt; If it's the latter, are you using encoded strings? If I
&lt;br&gt;&amp;gt; remember correctly
&lt;br&gt;&amp;gt; there should be safe-guards in place to try to perform a
&lt;br&gt;&amp;gt; best effort decoding
&lt;br&gt;&amp;gt; of strings (as per usual, a traceback would be helpful here
&lt;br&gt;&amp;gt; with relevant
&lt;br&gt;&amp;gt; data).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; but they were not recognized. It finally seems that I
&lt;br&gt;&amp;gt; could identify the problem to the file Compiler.py. The line
&lt;br&gt;&amp;gt; looking for the encoding is using re.match rather than
&lt;br&gt;&amp;gt; re.search
&lt;br&gt;&amp;gt; &amp;gt; I would think that re.match should work but in fact it
&lt;br&gt;&amp;gt; does not. 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I corrected the problem in my system by applying the
&lt;br&gt;&amp;gt; simple patch that is included at the end. Is it correct? Or
&lt;br&gt;&amp;gt; the problem shows from some other issue that I am not
&lt;br&gt;&amp;gt; seeing?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Looks simple enough, do you have a test case that I can add
&lt;br&gt;&amp;gt; to our
&lt;br&gt;&amp;gt; regression tests?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Another question: The behavior of cheetah has changed
&lt;br&gt;&amp;gt; from version 2.0.1 . Previously I did not have any encoding
&lt;br&gt;&amp;gt; defined and it just worked. Now I have to include a line
&lt;br&gt;&amp;gt; with the encoding in each file to make it work. Is there
&lt;br&gt;&amp;gt; another way to do it (like defining a global encoding)?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'll have to get back to you on the global encoding thing,
&lt;br&gt;&amp;gt; the basis of this
&lt;br&gt;&amp;gt; change was to resolve a number of outstanding unicode
&lt;br&gt;&amp;gt; issues with previous
&lt;br&gt;&amp;gt; versions of Cheetah, by making all internal strings to
&lt;br&gt;&amp;gt; Cheetah unicode objects,
&lt;br&gt;&amp;gt; instead of a mix of encoded strings and unicode objects,
&lt;br&gt;&amp;gt; etc.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt; -R. Tyler Ballance
&lt;br&gt;&amp;gt; --------------------------------------
&lt;br&gt;&amp;gt; &amp;nbsp;Jabber: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26510161&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rtyler@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;gt;    Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26510161&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/encoding-problem-tp26506812p26510161.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26506899</id>
	<title>Re: encoding problem</title>
	<published>2009-11-24T19:03:44Z</published>
	<updated>2009-11-24T19:03:44Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;On Tue, 24 Nov 2009, Juan Fiol wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi, using versions 2.2.2 and 2.4.0 in gentoo I found that previous working templates (with version 2.0.1) do not longer work. The error point out to encoding (ascii not being good for some chars). After posting to tahchee mail list, I included encoding directives like suggested in the manual:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #encoding: UTF-8
&lt;br&gt;&lt;br&gt;Are you referring to the *compiled* templates or the uncompiled templates? If
&lt;br&gt;it's the former than I might need to bump the latest compatible version tuple.
&lt;br&gt;If it's the latter, are you using encoded strings? If I remember correctly
&lt;br&gt;there should be safe-guards in place to try to perform a best effort decoding
&lt;br&gt;of strings (as per usual, a traceback would be helpful here with relevant
&lt;br&gt;data).
&lt;br&gt;&lt;br&gt;&amp;gt; but they were not recognized. It finally seems that I could identify the problem to the file Compiler.py. The line looking for the encoding is using re.match rather than re.search
&lt;br&gt;&amp;gt; I would think that re.match should work but in fact it does not. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I corrected the problem in my system by applying the simple patch that is included at the end. Is it correct? Or the problem shows from some other issue that I am not seeing?
&lt;br&gt;&lt;br&gt;Looks simple enough, do you have a test case that I can add to our
&lt;br&gt;regression tests?
&lt;br&gt;&lt;br&gt;&amp;gt; Another question: The behavior of cheetah has changed from version 2.0.1 . Previously I did not have any encoding defined and it just worked. Now I have to include a line with the encoding in each file to make it work. Is there another way to do it (like defining a global encoding)?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;I'll have to get back to you on the global encoding thing, the basis of this
&lt;br&gt;change was to resolve a number of outstanding unicode issues with previous
&lt;br&gt;versions of Cheetah, by making all internal strings to Cheetah unicode objects,
&lt;br&gt;instead of a mix of encoded strings and unicode objects, etc.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;Jabber: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26506899&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rtyler@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26506899&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (205 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26506899/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/encoding-problem-tp26506812p26506899.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26506812</id>
	<title>encoding problem</title>
	<published>2009-11-24T18:51:29Z</published>
	<updated>2009-11-24T18:51:29Z</updated>
	<author>
		<name>Juan Fiol</name>
	</author>
	<content type="html">Hi, using versions 2.2.2 and 2.4.0 in gentoo I found that previous working templates (with version 2.0.1) do not longer work. The error point out to encoding (ascii not being good for some chars). After posting to tahchee mail list, I included encoding directives like suggested in the manual:
&lt;br&gt;&lt;br&gt;#encoding: UTF-8
&lt;br&gt;&lt;br&gt;but they were not recognized. It finally seems that I could identify the problem to the file Compiler.py. The line looking for the encoding is using re.match rather than re.search
&lt;br&gt;I would think that re.match should work but in fact it does not. 
&lt;br&gt;&lt;br&gt;I corrected the problem in my system by applying the simple patch that is included at the end. Is it correct? Or the problem shows from some other issue that I am not seeing?
&lt;br&gt;&lt;br&gt;Another question: The behavior of cheetah has changed from version 2.0.1 . Previously I did not have any encoding defined and it just worked. Now I have to include a line with the encoding in each file to make it work. Is there another way to do it (like defining a global encoding)?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Cheers, Juan
&lt;br&gt;&lt;br&gt;Info:
&lt;br&gt;Cheetah versions: 2.2.2 and 2.4.0
&lt;br&gt;OS: gentoo linux
&lt;br&gt;Python: 2.6.1, 2.6.2 
&lt;br&gt;&lt;br&gt;&lt;br&gt;Patch follows:
&lt;br&gt;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
&lt;br&gt;--- /root/Compiler.py	2009-11-24 23:21:24.000000000 -0300
&lt;br&gt;+++ Compiler.py	2009-11-24 23:20:03.000000000 -0300
&lt;br&gt;@@ -1569,7 +1569,7 @@
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unicodeMatch = unicodeDirectiveRE.search(source)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;encodingMatch = encodingDirectiveRE.match(source)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;encodingMatch = encodingDirectiveRE.search(source)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if unicodeMatch:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if encodingMatch:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise ParseError(
&lt;br&gt;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26506812&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/encoding-problem-tp26506812p26506812.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26476260</id>
	<title>Re: Cheetah at PyCon Atlanta 2010</title>
	<published>2009-11-23T03:21:51Z</published>
	<updated>2009-11-23T03:21:51Z</updated>
	<author>
		<name>Bugzilla from jbq@caraldi.com</name>
	</author>
	<content type="html">2009/11/17 &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26476260&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Long-time users might be aware that Cheetah was originally introduced at
&lt;br&gt;&amp;gt; PyCon10 by Mike, Tavis and Ian.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; As I look over my refactoring work for Python 3 support and the progress we've made over
&lt;br&gt;&amp;gt; the past few months, I'm wondering if it would be worth &amp;quot;re-introducing&amp;quot;
&lt;br&gt;&amp;gt; Cheetah at PyCon 2010 this upcoming February in Atlanta. I lament that Cheetah
&lt;br&gt;&amp;gt; has seemingly fallen out of favor among newer Python developers (Django and the
&lt;br&gt;&amp;gt; Google App Engine aren't doing us any favors) but I would like to start to turn
&lt;br&gt;&amp;gt; that around.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a couple of questions for you, delightful members of the Cheetah
&lt;br&gt;&amp;gt; community:
&lt;br&gt;&amp;gt;   * Talk proposals are closed currently, but would anybody be interested in
&lt;br&gt;&amp;gt;     participating in a development sprint and/or Cheetah meetup during the
&lt;br&gt;&amp;gt;     sprint days?
&lt;br&gt;&amp;gt;   * Suggestions on how to improve Cheetah's interestingness to the newer crowd
&lt;br&gt;&amp;gt;     of (primarily web) developers using Python and other templating systems?
&lt;br&gt;&amp;gt;   * Anybody using Cheetah at a corporate level that would consider helping
&lt;br&gt;&amp;gt;     with airfare costs from SFO to ATL? (have to ask ;))
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I've not ordered a plane ticket or reserved a hotel room yet, I'm still
&lt;br&gt;&amp;gt; determining whether PyCon will be worth the ~$1000 it will cost me to get
&lt;br&gt;&amp;gt; there, in addition to the week of vacation time. I'd love to have a good reason
&lt;br&gt;&amp;gt; to justify the expense ;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Interested in hearing how many other Cheetah folks are planning to attend
&lt;/div&gt;&lt;br&gt;Hello Robert,
&lt;br&gt;&lt;br&gt;Silly question, did you ask Slide?
&lt;br&gt;-- 
&lt;br&gt;Jean-Baptiste Quenot
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26476260&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cheetah-at-PyCon-Atlanta-2010-tp26383981p26476260.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26473262</id>
	<title>Re: python 2.6 ascii codec error</title>
	<published>2009-11-22T22:15:15Z</published>
	<updated>2009-11-22T22:15:15Z</updated>
	<author>
		<name>Kevin Castiglione</name>
	</author>
	<content type="html">On Sun, Nov 22, 2009 at 10:00 PM,  &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26473262&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;


&lt;div&gt;
On Fri, 20 Nov 2009, kevin wrote:&lt;br&gt;
&amp;gt; i am trying to move to python 2.6 and latest cheetah 2.4. i am getting&lt;br&gt;
&amp;gt; this error with python 2.6 and cheetah 2.4.&lt;br&gt;
&amp;gt; the same template was working well with python 2.5 and cheetah 2.0.1.&lt;br&gt;
&amp;gt; thanks for the help&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;Apologies for the late reply.&lt;/blockquote&gt;&lt;div&gt;thanks for taking the time to reply.&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;



Looks like you&amp;#39;re using Web.py and I would double check that something else&lt;br&gt;
isn&amp;#39;t mucking with the encoding of the str object prior to passing it along to&lt;br&gt;
your cheetah wrapper.&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;this is the cheetah rendering part from web.py that i use. &lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://pastie.org/710831&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://pastie.org/710831&lt;/a&gt;&lt;br&gt;&lt;br&gt;i tried removing the filter part from render method, but i still get the same error. that seemed to be the only part that does some sort of encoding stuff.&lt;br&gt;


&lt;br&gt;is there something else that i can change/ try there to fix this problem? can you please take a look into the pastie.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;



Additionally, are you using #encoding or #unicode at all in your strings?&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;no, i am not using any #encoding or #unicode at all in the html templates.&lt;br&gt; &lt;br&gt;&lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;



Any more details you can provide would be helpful.&lt;br&gt;
&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;this works cheetah 2.0.1 and  python 2.6. please let me know if you would like me to give more details.&lt;br&gt;thanks a lot!&lt;br&gt;&lt;/div&gt;&lt;/div&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26473262&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/python-2.6-ascii-codec-error-tp26441632p26473262.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26473187</id>
	<title>Re: python 2.6 ascii codec error</title>
	<published>2009-11-22T22:00:08Z</published>
	<updated>2009-11-22T22:00:08Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;On Fri, 20 Nov 2009, kevin wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; i am trying to move to python 2.6 and latest cheetah 2.4. i am getting
&lt;br&gt;&amp;gt; this error with python 2.6 and cheetah 2.4.
&lt;br&gt;&amp;gt; the same template was working well with python 2.5 and cheetah 2.0.1.
&lt;br&gt;&amp;gt; thanks for the help
&lt;br&gt;&lt;br&gt;Apologies for the late reply. To your issue, the biggest change between Cheetah
&lt;br&gt;2.0.1 and Cheetah 2.4 was the Cheetah 2.2 release which changed all strings
&lt;br&gt;internally to use unicode objects instead of a hodge podge of unicode and str
&lt;br&gt;objects of various encodings. 
&lt;br&gt;&lt;br&gt;Looks like you're using Web.py and I would double check that something else
&lt;br&gt;isn't mucking with the encoding of the str object prior to passing it along to
&lt;br&gt;your cheetah wrapper.
&lt;br&gt;&lt;br&gt;Additionally, are you using #encoding or #unicode at all in your strings? 
&lt;br&gt;&lt;br&gt;Any more details you can provide would be helpful.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;/home/mark/work/common/web/cheetah.py&amp;quot;, line 95, in render
&lt;br&gt;&lt;br&gt;I recognize this path, something about it says &amp;quot;BidEgg&amp;quot; to me
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; compiled_tmpl = _compiletemplate(template, base=base, isString=isString)
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;/home/mark/work/common/web/utils.py&amp;quot;, line 387, in __call__
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; update(block=True)
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;/home/mark/work/common/web/utils.py&amp;quot;, line 382, in update
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; self.cache[key] = (self.func(*args, **keywords), time.time())
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;/home/mark/work/common/web/cheetah.py&amp;quot;, line 41, in __compiletemplate
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; tmpl_compiler = Compiler(source=text, mainClassName='GenTemplate')
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;/usr/lib64/python2.6/site-packages/Cheetah-2.4.0-py2.6-linux-x86_64.egg/Cheetah/Compiler.py&amp;quot;,
&lt;br&gt;&amp;gt; line 1588, in __init__
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; source = unicode(source)
&lt;br&gt;&amp;gt; UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
&lt;br&gt;&amp;gt; 7550: ordinal not in range(128)
&lt;/div&gt;&lt;/div&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;Jabber: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26473187&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rtyler@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26473187&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (205 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26473187/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/python-2.6-ascii-codec-error-tp26441632p26473187.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26441632</id>
	<title>python 2.6 ascii codec error</title>
	<published>2009-11-20T03:10:16Z</published>
	<updated>2009-11-20T03:10:16Z</updated>
	<author>
		<name>Kevin Castiglione</name>
	</author>
	<content type="html">i am trying to move to python 2.6 and latest cheetah 2.4. i am getting
&lt;br&gt;this error with python 2.6 and cheetah 2.4.
&lt;br&gt;the same template was working well with python 2.5 and cheetah 2.0.1.
&lt;br&gt;thanks for the help
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/home/mark/work/common/web/cheetah.py&amp;quot;, line 95, in render
&lt;br&gt;&amp;nbsp; &amp;nbsp; compiled_tmpl = _compiletemplate(template, base=base, isString=isString)
&lt;br&gt;&amp;nbsp; File &amp;quot;/home/mark/work/common/web/utils.py&amp;quot;, line 387, in __call__
&lt;br&gt;&amp;nbsp; &amp;nbsp; update(block=True)
&lt;br&gt;&amp;nbsp; File &amp;quot;/home/mark/work/common/web/utils.py&amp;quot;, line 382, in update
&lt;br&gt;&amp;nbsp; &amp;nbsp; self.cache[key] = (self.func(*args, **keywords), time.time())
&lt;br&gt;&amp;nbsp; File &amp;quot;/home/mark/work/common/web/cheetah.py&amp;quot;, line 41, in __compiletemplate
&lt;br&gt;&amp;nbsp; &amp;nbsp; tmpl_compiler = Compiler(source=text, mainClassName='GenTemplate')
&lt;br&gt;&amp;nbsp; File &amp;quot;/usr/lib64/python2.6/site-packages/Cheetah-2.4.0-py2.6-linux-x86_64.egg/Cheetah/Compiler.py&amp;quot;,
&lt;br&gt;line 1588, in __init__
&lt;br&gt;&amp;nbsp; &amp;nbsp; source = unicode(source)
&lt;br&gt;UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
&lt;br&gt;7550: ordinal not in range(128)
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26441632&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/python-2.6-ascii-codec-error-tp26441632p26441632.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26419978</id>
	<title>Call for testers! Release candidate numero uno for v2.4.1</title>
	<published>2009-11-18T19:47:22Z</published>
	<updated>2009-11-18T19:47:22Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">Hello again everybody :) 
&lt;br&gt;&lt;br&gt;I'd like introduce you to the first release candidate for Cheetah v2.4.1.
&lt;br&gt;&lt;br&gt;Zip: &lt;a href=&quot;http://github.com/rtyler/cheetah/zipball/v2.4.1rc1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler/cheetah/zipball/v2.4.1rc1&lt;/a&gt;&lt;br&gt;Tarball: &lt;a href=&quot;http://github.com/rtyler/cheetah/tarball/v2.4.1rc1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler/cheetah/tarball/v2.4.1rc1&lt;/a&gt;&lt;br&gt;&lt;br&gt;This minor bugfix/refactor release of Cheetah v2.4 includes a lot of code
&lt;br&gt;changes but very few functionality changes:
&lt;br&gt;&lt;br&gt;&amp;nbsp; * Prevent Template.compile() from creating classnames with numerous leading underscores
&lt;br&gt;&amp;nbsp; * Introduction of the cheetah-analyze script to report directive usage for templates
&lt;br&gt;&amp;nbsp; * Large amount of code updates in preparation for Cheetah 3.0 fork
&lt;br&gt;&amp;nbsp; * A few additional tests
&lt;br&gt;&lt;br&gt;I've introduced the &amp;quot;cheetah-analyze&amp;quot; script to start to gather feedback from
&lt;br&gt;you folks on what directives are being used the most in your templates. When I
&lt;br&gt;eventually fork Cheetah 3.0 (for Python 3 support) I would like to also start
&lt;br&gt;reducing some of the complexity in Cheetah by culling some unused directives
&lt;br&gt;(looking at you #defmacro). Please let me know if the script doesn't work
&lt;br&gt;properly, by the time v2.4.1 is finally released, I plan to have a web service
&lt;br&gt;set up to gather analysis submissions.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Ping me if you find any issues (Hudson is reporting no test failures:
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://hudson.cheetahtemplate.org/job/Cheetah%20(next)/225/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://hudson.cheetahtemplate.org/job/Cheetah%20(next)/225/&lt;/a&gt;&amp;gt;)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26419978&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (205 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26419978/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Call-for-testers%21-Release-candidate-numero-uno-for-v2.4.1-tp26419978p26419978.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26383981</id>
	<title>Cheetah at PyCon Atlanta 2010</title>
	<published>2009-11-16T19:44:51Z</published>
	<updated>2009-11-16T19:44:51Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">Long-time users might be aware that Cheetah was originally introduced at
&lt;br&gt;PyCon10 by Mike, Tavis and Ian. 
&lt;br&gt;&lt;br&gt;As I look over my refactoring work for Python 3 support and the progress we've made over
&lt;br&gt;the past few months, I'm wondering if it would be worth &amp;quot;re-introducing&amp;quot;
&lt;br&gt;Cheetah at PyCon 2010 this upcoming February in Atlanta. I lament that Cheetah
&lt;br&gt;has seemingly fallen out of favor among newer Python developers (Django and the
&lt;br&gt;Google App Engine aren't doing us any favors) but I would like to start to turn
&lt;br&gt;that around.
&lt;br&gt;&lt;br&gt;I have a couple of questions for you, delightful members of the Cheetah
&lt;br&gt;community: 
&lt;br&gt;&amp;nbsp; &amp;nbsp;* Talk proposals are closed currently, but would anybody be interested in
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;participating in a development sprint and/or Cheetah meetup during the
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;sprint days?
&lt;br&gt;&amp;nbsp; &amp;nbsp;* Suggestions on how to improve Cheetah's interestingness to the newer crowd
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;of (primarily web) developers using Python and other templating systems?
&lt;br&gt;&amp;nbsp; &amp;nbsp;* Anybody using Cheetah at a corporate level that would consider helping 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;with airfare costs from SFO to ATL? (have to ask ;))
&lt;br&gt;&lt;br&gt;I've not ordered a plane ticket or reserved a hotel room yet, I'm still
&lt;br&gt;determining whether PyCon will be worth the ~$1000 it will cost me to get
&lt;br&gt;there, in addition to the week of vacation time. I'd love to have a good reason
&lt;br&gt;to justify the expense ;)
&lt;br&gt;&lt;br&gt;Interested in hearing how many other Cheetah folks are planning to attend
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26383981&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (205 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26383981/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cheetah-at-PyCon-Atlanta-2010-tp26383981p26383981.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26377394</id>
	<title>Re: problem with include directive on cheetah 2.4.0</title>
	<published>2009-11-16T10:51:07Z</published>
	<updated>2009-11-16T10:51:07Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;On Mon, 16 Nov 2009, Uhanov, Kirill wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Probably I found workaround for me.
&lt;br&gt;&amp;gt; I made some changes for className from compile procedure. 
&lt;br&gt;&amp;gt; I replaced starts underscores in generated class name.
&lt;br&gt;&lt;br&gt;I've gone ahead and committed this and pushed it to my rtyler/next branch [1], 
&lt;br&gt;if you feel so inclined to contribute more in the future, I posted an overview
&lt;br&gt;of some okf the means of contributing to Cheetah here:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://sourceforge.net/mailarchive/forum.php?thread_name=20090928172435.GA4130%40starfruit.corp.slide.com&amp;forum_name=cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/mailarchive/forum.php?thread_name=20090928172435.GA4130%40starfruit.corp.slide.com&amp;forum_name=cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;br&gt;Tests are passing on Python 2.4/2.5/2.6 [2] so I think this will be fine to be
&lt;br&gt;included in 2.4.1, thanks :)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;[1] &lt;a href=&quot;http://github.com/rtyler/cheetah/tree/next&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler/cheetah/tree/next&lt;/a&gt;&lt;br&gt;[2] &lt;a href=&quot;http://avocado.monkeypox.org/job/Cheetah%20(next)/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://avocado.monkeypox.org/job/Cheetah%20(next)/&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26377394&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (205 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26377394/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/problem-with-include-directive-on-cheetah-2.4.0-tp26333646p26377394.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26371510</id>
	<title>Re: problem with include directive on cheetah 2.4.0</title>
	<published>2009-11-16T05:00:41Z</published>
	<updated>2009-11-16T05:00:41Z</updated>
	<author>
		<name>Uhanov, Kirill</name>
	</author>
	<content type="html">Probably I found workaround for me.
&lt;br&gt;I made some changes for className from compile procedure. 
&lt;br&gt;I replaced starts underscores in generated class name.
&lt;br&gt;&lt;br&gt;Index: Template.py
&lt;br&gt;===================================================================
&lt;br&gt;--- Template.py	(revision 77774)
&lt;br&gt;+++ Template.py	(working copy)
&lt;br&gt;@@ -640,7 +640,7 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not isinstance(className, (types.NoneType, basestring)):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise TypeError(errmsg % ('className', 'string or None'))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;className = className or moduleName
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;className = re.sub(r'^_+','', className or moduleName)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if mainMethodName is Unspecified:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mainMethodName = klass._CHEETAH_defaultMainMethodNameForTemplates
&lt;br&gt;&lt;br&gt;Thanks, Kirill
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: Uhanov, Kirill [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371510&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kirill.uhanov@...&lt;/a&gt;] 
&lt;br&gt;Sent: Monday, November 16, 2009 11:20 AM
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371510&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;; James Abbatiello
&lt;br&gt;Cc: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371510&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [Cheetahtemplate-discuss] problem with include directive on cheetah 2.4.0
&lt;br&gt;&lt;br&gt;Thanks, James, for your information.
&lt;br&gt;&lt;br&gt;Tyler, this is not windows specific problem. I've reproduced that on Linux too. 
&lt;br&gt;Could I get some workaround for cheetah name generation? 
&lt;br&gt;Kirill
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: James Abbatiello [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371510&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;abbeyj@...&lt;/a&gt;] 
&lt;br&gt;Sent: Saturday, November 14, 2009 8:00 AM
&lt;br&gt;To: Uhanov, Kirill; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371510&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [Cheetahtemplate-discuss] problem with include directive on cheetah 2.4.0
&lt;br&gt;&lt;br&gt;On Fri, Nov 13, 2009 at 5:15 PM, &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371510&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; At first glance, nothing here looks wrong (at least in your usage of #include),
&lt;br&gt;&amp;gt; that said I won't have a chance to take a look at this until tomorrow morning.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Do you have access to a Mac or Windows machine to try this there? I'd just like
&lt;br&gt;&amp;gt; to rule out that this is not a Cheetah/Windows issue.
&lt;br&gt;&lt;br&gt;The generated class name starts with 3 underscores. &amp;nbsp;You can't refer
&lt;br&gt;to such a name from within a method due to private name mangling
&lt;br&gt;(&lt;a href=&quot;http://docs.python.org/reference/expressions.html#atom-identifiers&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.python.org/reference/expressions.html#atom-identifiers&lt;/a&gt;).
&lt;br&gt;Here's a small bit of Python that shows the problem:
&lt;br&gt;&lt;br&gt;__B = 0
&lt;br&gt;class A():
&lt;br&gt;&amp;nbsp; &amp;nbsp; def f(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return __B
&lt;br&gt;print A().f()
&lt;br&gt;&lt;br&gt;This looks like it should print &amp;quot;0&amp;quot; but instead you get:
&lt;br&gt;NameError: global name '_A__B' is not defined
&lt;br&gt;&lt;br&gt;There's probably some way around this but it may be better just to
&lt;br&gt;ensure that generated identifiers never start with 2 or more
&lt;br&gt;underscores.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;James Abbatiello
&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;Closed Joint Stock Company Intel A/O
&lt;br&gt;Registered legal address: Krylatsky Hills Business Park, 
&lt;br&gt;17 Krylatskaya Str., Bldg 4, Moscow 121614, 
&lt;br&gt;Russian Federation
&lt;br&gt;&lt;br&gt;This e-mail and any attachments may contain confidential material for
&lt;br&gt;the sole use of the intended recipient(s). Any review or distribution
&lt;br&gt;by others is strictly prohibited. If you are not the intended
&lt;br&gt;recipient, please contact the sender and delete all copies.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371510&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;Closed Joint Stock Company Intel A/O
&lt;br&gt;Registered legal address: Krylatsky Hills Business Park, 
&lt;br&gt;17 Krylatskaya Str., Bldg 4, Moscow 121614, 
&lt;br&gt;Russian Federation
&lt;br&gt;&lt;br&gt;This e-mail and any attachments may contain confidential material for
&lt;br&gt;the sole use of the intended recipient(s). Any review or distribution
&lt;br&gt;by others is strictly prohibited. If you are not the intended
&lt;br&gt;recipient, please contact the sender and delete all copies.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26371510&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/problem-with-include-directive-on-cheetah-2.4.0-tp26333646p26371510.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26368243</id>
	<title>Re: problem with include directive on cheetah 2.4.0</title>
	<published>2009-11-16T00:19:40Z</published>
	<updated>2009-11-16T00:19:40Z</updated>
	<author>
		<name>Uhanov, Kirill</name>
	</author>
	<content type="html">Thanks, James, for your information.
&lt;br&gt;&lt;br&gt;Tyler, this is not windows specific problem. I've reproduced that on Linux too. 
&lt;br&gt;Could I get some workaround for cheetah name generation? 
&lt;br&gt;Kirill
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: James Abbatiello [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26368243&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;abbeyj@...&lt;/a&gt;] 
&lt;br&gt;Sent: Saturday, November 14, 2009 8:00 AM
&lt;br&gt;To: Uhanov, Kirill; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26368243&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [Cheetahtemplate-discuss] problem with include directive on cheetah 2.4.0
&lt;br&gt;&lt;br&gt;On Fri, Nov 13, 2009 at 5:15 PM, &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26368243&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; At first glance, nothing here looks wrong (at least in your usage of #include),
&lt;br&gt;&amp;gt; that said I won't have a chance to take a look at this until tomorrow morning.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Do you have access to a Mac or Windows machine to try this there? I'd just like
&lt;br&gt;&amp;gt; to rule out that this is not a Cheetah/Windows issue.
&lt;br&gt;&lt;br&gt;The generated class name starts with 3 underscores. &amp;nbsp;You can't refer
&lt;br&gt;to such a name from within a method due to private name mangling
&lt;br&gt;(&lt;a href=&quot;http://docs.python.org/reference/expressions.html#atom-identifiers&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.python.org/reference/expressions.html#atom-identifiers&lt;/a&gt;).
&lt;br&gt;Here's a small bit of Python that shows the problem:
&lt;br&gt;&lt;br&gt;__B = 0
&lt;br&gt;class A():
&lt;br&gt;&amp;nbsp; &amp;nbsp; def f(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return __B
&lt;br&gt;print A().f()
&lt;br&gt;&lt;br&gt;This looks like it should print &amp;quot;0&amp;quot; but instead you get:
&lt;br&gt;NameError: global name '_A__B' is not defined
&lt;br&gt;&lt;br&gt;There's probably some way around this but it may be better just to
&lt;br&gt;ensure that generated identifiers never start with 2 or more
&lt;br&gt;underscores.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;James Abbatiello
&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;Closed Joint Stock Company Intel A/O
&lt;br&gt;Registered legal address: Krylatsky Hills Business Park, 
&lt;br&gt;17 Krylatskaya Str., Bldg 4, Moscow 121614, 
&lt;br&gt;Russian Federation
&lt;br&gt;&lt;br&gt;This e-mail and any attachments may contain confidential material for
&lt;br&gt;the sole use of the intended recipient(s). Any review or distribution
&lt;br&gt;by others is strictly prohibited. If you are not the intended
&lt;br&gt;recipient, please contact the sender and delete all copies.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26368243&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/problem-with-include-directive-on-cheetah-2.4.0-tp26333646p26368243.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26347245</id>
	<title>Re: problem with include directive on cheetah 2.4.0</title>
	<published>2009-11-13T21:00:02Z</published>
	<updated>2009-11-13T21:00:02Z</updated>
	<author>
		<name>James Abbatiello</name>
	</author>
	<content type="html">On Fri, Nov 13, 2009 at 5:15 PM, &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26347245&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; At first glance, nothing here looks wrong (at least in your usage of #include),
&lt;br&gt;&amp;gt; that said I won't have a chance to take a look at this until tomorrow morning.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Do you have access to a Mac or Windows machine to try this there? I'd just like
&lt;br&gt;&amp;gt; to rule out that this is not a Cheetah/Windows issue.
&lt;br&gt;&lt;br&gt;The generated class name starts with 3 underscores. &amp;nbsp;You can't refer
&lt;br&gt;to such a name from within a method due to private name mangling
&lt;br&gt;(&lt;a href=&quot;http://docs.python.org/reference/expressions.html#atom-identifiers&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.python.org/reference/expressions.html#atom-identifiers&lt;/a&gt;).
&lt;br&gt;Here's a small bit of Python that shows the problem:
&lt;br&gt;&lt;br&gt;__B = 0
&lt;br&gt;class A():
&lt;br&gt;&amp;nbsp; &amp;nbsp; def f(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return __B
&lt;br&gt;print A().f()
&lt;br&gt;&lt;br&gt;This looks like it should print &amp;quot;0&amp;quot; but instead you get:
&lt;br&gt;NameError: global name '_A__B' is not defined
&lt;br&gt;&lt;br&gt;There's probably some way around this but it may be better just to
&lt;br&gt;ensure that generated identifiers never start with 2 or more
&lt;br&gt;underscores.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;James Abbatiello
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26347245&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/problem-with-include-directive-on-cheetah-2.4.0-tp26333646p26347245.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26344448</id>
	<title>Re: @staticmethod verses multiple #extends inheritance</title>
	<published>2009-11-13T14:18:51Z</published>
	<updated>2009-11-13T14:18:51Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;On Tue, 10 Nov 2009, Dirk van Oosterbosch, IR labs wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I've been using Cheetah for a few years, but I've haven't been &amp;nbsp;
&lt;br&gt;&amp;gt; following the list or the developments closely.
&lt;br&gt;&amp;gt; And I remember that multiple inheritance wasn't possible with previous &amp;nbsp;
&lt;br&gt;&amp;gt; versions of Cheetah.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Now I'm reading that since v2.2.2 multiple inheritance is possible. &amp;nbsp;
&lt;br&gt;&amp;gt; Great! :-)
&lt;br&gt;&amp;gt; I read about the #@staticmethod decorator, and this recipe &lt;a href=&quot;http://packages.python.org/Cheetah/recipes/staticmethod.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://packages.python.org/Cheetah/recipes/staticmethod.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What would be better to use if I would like to mix #def's of different &amp;nbsp;
&lt;br&gt;&amp;gt; template clases?
&lt;br&gt;&amp;gt; What's the difference between
&lt;br&gt;&amp;gt; #from foo import foo
&lt;br&gt;&amp;gt; and
&lt;br&gt;&amp;gt; #extends myclass, foo
&lt;br&gt;&amp;gt; ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Currently I'm using an Cheetah / pure python inheritance hierarchy to &amp;nbsp;
&lt;br&gt;&amp;gt; use different framework functionality and libraries throughout my &amp;nbsp;
&lt;br&gt;&amp;gt; different pages. Something like:
&lt;br&gt;&amp;gt; BaseSkeleton.tmpl
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;-&amp;gt; ExtraComponents.tmpl
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; PythonFramework.py
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; page.tmpl
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; typeA.tmpl
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; typeB.tmpl
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; typeC.tmpl
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; subtypeC2.tmpl
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Now I would like to use #def methods from typeA.tmpl in subtypeC2.tmpl.
&lt;br&gt;&amp;gt; And maybe also the other way around: use #def methods from &amp;nbsp;
&lt;br&gt;&amp;gt; subtypeC2.tmpl in typeA.tmpl
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Would I be using the now possible multiple inheritance? Or the &amp;nbsp;
&lt;br&gt;&amp;gt; #@staticmethod decorator?
&lt;/div&gt;&lt;/div&gt;Depending on the method(s) and where they're used elsewhere, it could go either
&lt;br&gt;way IMO.
&lt;br&gt;&lt;br&gt;If you're just using a small number of methods from typaA in subtypeC2 then I'd
&lt;br&gt;just annotate them with a #@staticmethod decorator, otherwise I'd try multiple
&lt;br&gt;inheritance. The same rules apply for Cheetah multiple inheritance as in
&lt;br&gt;Python, so you want to make sure that typaA isn't squashing a method in typeC
&lt;br&gt;and vice versa
&lt;br&gt;&lt;br&gt;&amp;gt; And thanks for keeping Cheetah alive and kicking!
&lt;br&gt;&lt;br&gt;No prob ;)
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26344448&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (205 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26344448/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/%40staticmethod-verses-multiple--extends-inheritance-tp26287996p26344448.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26344396</id>
	<title>Re: problem with include directive on cheetah 2.4.0</title>
	<published>2009-11-13T14:15:00Z</published>
	<updated>2009-11-13T14:15:00Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;On Fri, 13 Nov 2009, Uhanov, Kirill wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi, All
&lt;br&gt;&amp;gt; Could you help me with my issue?
&lt;br&gt;&amp;gt; Some of my templates use include directive.
&lt;br&gt;&amp;gt; But I have NameError error then I run generated py file.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; For example, I have tmpl and txt files (they are located in c:\__1 dir)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; temp.tmpl
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #include &amp;quot;temp.txt&amp;quot;
&lt;br&gt;&amp;gt; temp.txt
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Hello
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Call compile cmdline command
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; python C:\python\Scripts\cheetah-compile temp.tmpl
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Run generated py script:
&lt;br&gt;&amp;gt; python temp.py
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Traceback (most recent call last):
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;temp.py&amp;quot;, line 124, in &amp;lt;module&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; CmdLineIface(templateObj=temp()).run()
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;C:\python\lib\site-packages\Cheetah\TemplateCmdLineIface.py&amp;quot;, line 44, in run
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; print self._template
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;C:\python\lib\site-packages\Cheetah\Template.py&amp;quot;, line 997, in __str__
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; rc = getattr(self, mainMethName)()
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;temp.py&amp;quot;, line 82, in respond
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; self._handleCheetahInclude(&amp;quot;temp.txt&amp;quot;, trans=trans, includeFrom=&amp;quot;file&amp;quot;, raw=False)
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;C:\python\lib\site-packages\Cheetah\Template.py&amp;quot;, line 1582, in _handleCheetahInclude
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; _globalSetVars=self._CHEETAH__globalSetVars)
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;__1_temp_txt.py&amp;quot;, line 55, in __init__
&lt;br&gt;&amp;gt; NameError: global name '_1_temp_txt__1_temp_txt' is not defined
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If I move temp.py to c:\1 directory all works fine
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What did I do wrong? Is this known problem?
&lt;/div&gt;&lt;/div&gt;At first glance, nothing here looks wrong (at least in your usage of #include),
&lt;br&gt;that said I won't have a chance to take a look at this until tomorrow morning.
&lt;br&gt;&lt;br&gt;Do you have access to a Mac or Windows machine to try this there? I'd just like
&lt;br&gt;to rule out that this is not a Cheetah/Windows issue.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26344396&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (205 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26344396/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/problem-with-include-directive-on-cheetah-2.4.0-tp26333646p26344396.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26333646</id>
	<title>problem with include directive on cheetah 2.4.0</title>
	<published>2009-11-13T01:27:02Z</published>
	<updated>2009-11-13T01:27:02Z</updated>
	<author>
		<name>Uhanov, Kirill</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot; xmlns:p=&quot;urn:schemas-microsoft-com:office:powerpoint&quot; xmlns:a=&quot;urn:schemas-microsoft-com:office:access&quot; xmlns:dt=&quot;uuid:C2F41010-65B3-11d1-A29F-00AA00C14882&quot; xmlns:s=&quot;uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882&quot; xmlns:rs=&quot;urn:schemas-microsoft-com:rowset&quot; xmlns:z=&quot;#RowsetSchema&quot; xmlns:b=&quot;urn:schemas-microsoft-com:office:publisher&quot; xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot; xmlns:c=&quot;urn:schemas-microsoft-com:office:component:spreadsheet&quot; xmlns:odc=&quot;urn:schemas-microsoft-com:office:odc&quot; xmlns:oa=&quot;urn:schemas-microsoft-com:office:activation&quot; xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:q=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:rtc=&quot;http://microsoft.com/officenet/conferencing&quot; xmlns:D=&quot;DAV:&quot; xmlns:Repl=&quot;http://schemas.microsoft.com/repl/&quot; xmlns:mt=&quot;http://schemas.microsoft.com/sharepoint/soap/meetings/&quot; xmlns:x2=&quot;http://schemas.microsoft.com/office/excel/2003/xml&quot; xmlns:ppda=&quot;http://www.passport.com/NameSpace.xsd&quot; xmlns:ois=&quot;http://schemas.microsoft.com/sharepoint/soap/ois/&quot; xmlns:dir=&quot;http://schemas.microsoft.com/sharepoint/soap/directory/&quot; xmlns:ds=&quot;http://www.w3.org/2000/09/xmldsig#&quot; xmlns:dsp=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:udc=&quot;http://schemas.microsoft.com/data/udc&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:sub=&quot;http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/&quot; xmlns:ec=&quot;http://www.w3.org/2001/04/xmlenc#&quot; xmlns:sp=&quot;http://schemas.microsoft.com/sharepoint/&quot; xmlns:sps=&quot;http://schemas.microsoft.com/sharepoint/soap/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:udcs=&quot;http://schemas.microsoft.com/data/udc/soap&quot; xmlns:udcxf=&quot;http://schemas.microsoft.com/data/udc/xmlfile&quot; xmlns:udcp2p=&quot;http://schemas.microsoft.com/data/udc/parttopart&quot; xmlns:st=&quot;&amp;#1;&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 11 (filtered medium)&quot;&gt;


&lt;/head&gt;

&lt;body lang=RU link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;Hi, All&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;Could you help me with my issue?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;Some of my templates use include directive. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;But I have NameError error then I run generated py
file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;For example, I have tmpl and txt files (they are
located in &lt;b&gt;&lt;font color=red&gt;&lt;span style='color:red;font-weight:bold'&gt;c:\__1&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;
dir)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;temp.tmpl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
#include &amp;quot;temp.txt&amp;quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;temp.txt&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Hello&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;Call compile cmdline command&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; python
C:\python\Scripts\cheetah-compile temp.tmpl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;Run generated py script:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal style='text-indent:35.4pt'&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:Arial'&gt;python temp.py&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;Traceback (most recent call last):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp; File &amp;quot;temp.py&amp;quot;, line 124, in
&amp;lt;module&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CmdLineIface(templateObj=temp()).run()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp; File
&amp;quot;C:\python\lib\site-packages\Cheetah\TemplateCmdLineIface.py&amp;quot;, line
44, in run&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print self._template&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp; File
&amp;quot;C:\python\lib\site-packages\Cheetah\Template.py&amp;quot;, line 997, in
__str__&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rc = getattr(self, mainMethName)()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp; File &amp;quot;temp.py&amp;quot;, line 82, in respond&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
self._handleCheetahInclude(&amp;quot;temp.txt&amp;quot;, trans=trans,
includeFrom=&amp;quot;file&amp;quot;, raw=False)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp; File
&amp;quot;C:\python\lib\site-packages\Cheetah\Template.py&amp;quot;, line 1582, in
_handleCheetahInclude&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
_globalSetVars=self._CHEETAH__globalSetVars)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&amp;nbsp; File &amp;quot;__1_temp_txt.py&amp;quot;, line 55, in
__init__&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;font size=2 color=red face=Arial&gt;&lt;span lang=EN-US style='font-size:10.0pt;font-family:Arial;color:red;font-weight:bold'&gt;NameError:
global name '_1_temp_txt__1_temp_txt' is not defined&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;If I move temp.py to &lt;b&gt;&lt;font color=red&gt;&lt;span style='color:red;font-weight:bold'&gt;c:\1&lt;/span&gt;&lt;/font&gt;&lt;/b&gt; directory all works
fine&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;What did I do wrong? Is this known problem?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span lang=EN-US style='font-size:
10.0pt;font-family:Arial'&gt;Thanks, Kirill&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;pre&gt;
--------------------------------------------------------------------
Closed Joint Stock Company Intel A/O
Registered legal address: Krylatsky Hills Business Park, 
17 Krylatskaya Str., Bldg 4, Moscow 121614, 
Russian Federation

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
&lt;/pre&gt;&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26333646&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/problem-with-include-directive-on-cheetah-2.4.0-tp26333646p26333646.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26287996</id>
	<title>@staticmethod verses multiple #extends inheritance</title>
	<published>2009-11-10T09:25:57Z</published>
	<updated>2009-11-10T09:25:57Z</updated>
	<author>
		<name>Dirk van Oosterbosch, IR labs</name>
	</author>
	<content type="html">&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;I've been using Cheetah for a few years, but I've haven't been &amp;nbsp;
&lt;br&gt;following the list or the developments closely.
&lt;br&gt;And I remember that multiple inheritance wasn't possible with previous &amp;nbsp;
&lt;br&gt;versions of Cheetah.
&lt;br&gt;&lt;br&gt;Now I'm reading that since v2.2.2 multiple inheritance is possible. &amp;nbsp;
&lt;br&gt;Great! :-)
&lt;br&gt;I read about the #@staticmethod decorator, and this recipe &lt;a href=&quot;http://packages.python.org/Cheetah/recipes/staticmethod.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://packages.python.org/Cheetah/recipes/staticmethod.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;What would be better to use if I would like to mix #def's of different &amp;nbsp;
&lt;br&gt;template clases?
&lt;br&gt;What's the difference between
&lt;br&gt;#from foo import foo
&lt;br&gt;and
&lt;br&gt;#extends myclass, foo
&lt;br&gt;?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Currently I'm using an Cheetah / pure python inheritance hierarchy to &amp;nbsp;
&lt;br&gt;use different framework functionality and libraries throughout my &amp;nbsp;
&lt;br&gt;different pages. Something like:
&lt;br&gt;BaseSkeleton.tmpl
&lt;br&gt;&amp;nbsp; &amp;nbsp;-&amp;gt; ExtraComponents.tmpl
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; PythonFramework.py
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; page.tmpl
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; typeA.tmpl
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; typeB.tmpl
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; typeC.tmpl
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt; subtypeC2.tmpl
&lt;br&gt;&lt;br&gt;Now I would like to use #def methods from typeA.tmpl in subtypeC2.tmpl.
&lt;br&gt;And maybe also the other way around: use #def methods from &amp;nbsp;
&lt;br&gt;subtypeC2.tmpl in typeA.tmpl
&lt;br&gt;&lt;br&gt;Would I be using the now possible multiple inheritance? Or the &amp;nbsp;
&lt;br&gt;#@staticmethod decorator?
&lt;br&gt;&lt;br&gt;best regards
&lt;br&gt;And thanks for keeping Cheetah alive and kicking!
&lt;br&gt;dirk
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;-----------------------------
&lt;br&gt;Dirk van Oosterbosch
&lt;br&gt;de Wittenstraat 225
&lt;br&gt;1052 AT Amsterdam
&lt;br&gt;the Netherlands
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://labs.ixopusada.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://labs.ixopusada.com&lt;/a&gt;&lt;br&gt;-----------------------------
&lt;br&gt;--
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26287996&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/%40staticmethod-verses-multiple--extends-inheritance-tp26287996p26287996.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26270072</id>
	<title>[PATCH 3/3] Refactor CheetahWrapper tests to locate my local cheetah/cheetah-compile in my PATH</title>
	<published>2009-11-09T09:13:18Z</published>
	<updated>2009-11-09T09:13:18Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">Adding the &amp;quot;buildandrun&amp;quot; shortcut script so to easily rerun the
&lt;br&gt;full test suite locally; usage: ./buildandrun cheetah/Tests/Test.py
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;buildandrun &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 66 +++++++++++++++++++++++++++++++++++++++
&lt;br&gt;&amp;nbsp;cheetah/Tests/CheetahWrapper.py | &amp;nbsp; 27 +++++++++++++---
&lt;br&gt;&amp;nbsp;2 files changed, 88 insertions(+), 5 deletions(-)
&lt;br&gt;&amp;nbsp;create mode 100755 buildandrun
&lt;br&gt;&lt;br&gt;diff --git a/buildandrun b/buildandrun
&lt;br&gt;new file mode 100755
&lt;br&gt;index 0000000..d3b4e42
&lt;br&gt;--- /dev/null
&lt;br&gt;+++ b/buildandrun
&lt;br&gt;@@ -0,0 +1,66 @@
&lt;br&gt;+#!/usr/bin/env python
&lt;br&gt;+
&lt;br&gt;+import logging
&lt;br&gt;+import os
&lt;br&gt;+import os.path
&lt;br&gt;+import subprocess
&lt;br&gt;+import sys
&lt;br&gt;+
&lt;br&gt;+from optparse import OptionParser
&lt;br&gt;+
&lt;br&gt;+if os.getenv('DEBUG'):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;logging.basicConfig(level=logging.DEBUG)
&lt;br&gt;+
&lt;br&gt;+def recursiverm(d):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;for root, dirs, files in os.walk(d):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for f in files:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f = root + os.path.sep + f
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logging.debug('Removing file: %s' % f)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;os.unlink(f)
&lt;br&gt;+
&lt;br&gt;+def main():
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;op = OptionParser()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;op.add_option('-c', '--clean', dest='clean', action='store_true',
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;help='Remove the contents of the build directory')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;opts, args = op.parse_args()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;if not args:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('Specify a test script')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;if opts.clean:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logging.debug('Removing build/')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;recursiverm('build')
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;logging.debug('Building Cheetah')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;rc = subprocess.call(('python', 'setup.py', 'build'))
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;if rc:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logging.debug('Build failed!')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;logging.debug('Adjusting PATH and PYTHONPATH')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;cwd = os.getcwd()
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;libdir = None
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;scriptdir = None
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;for sub in os.listdir('build'):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if sub.startswith('scripts'):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;scriptdir = os.path.sep.join((cwd, 'build', sub))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if sub.startswith('lib'):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;libdir = os.path.sep.join((cwd, 'build', sub))
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;newpath = '%s:%s' % (scriptdir, os.getenv('PATH'))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;logging.debug('Setting PATH to: %s' % newpath)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;os.putenv('PATH', newpath)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;logging.debug('Setting PYTHONPATH to: %s' % libdir)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;os.putenv('PYTHONPATH', libdir)
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;rc = subprocess.call( ['python',] + args )
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+if __name__ == '__main__':
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;main()
&lt;br&gt;+
&lt;br&gt;diff --git a/cheetah/Tests/CheetahWrapper.py b/cheetah/Tests/CheetahWrapper.py
&lt;br&gt;index 809be40..e44edef 100644
&lt;br&gt;--- a/cheetah/Tests/CheetahWrapper.py
&lt;br&gt;+++ b/cheetah/Tests/CheetahWrapper.py
&lt;br&gt;@@ -12,6 +12,8 @@ Besides unittest usage, recognizes the following command-line options:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Show the output of each subcommand. &amp;nbsp;(Normally suppressed.)
&lt;br&gt;&amp;nbsp;'''
&lt;br&gt;&amp;nbsp;import os
&lt;br&gt;+import os.path
&lt;br&gt;+import pdb
&lt;br&gt;&amp;nbsp;import re &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Used by listTests.
&lt;br&gt;&amp;nbsp;import shutil
&lt;br&gt;&amp;nbsp;import sys
&lt;br&gt;@@ -24,10 +26,13 @@ from Cheetah.CheetahWrapper import CheetahWrapper &amp;nbsp;# Used by NoBackup.
&lt;br&gt;&amp;nbsp;try:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;from subprocess import Popen, PIPE, STDOUT
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;class Popen4(Popen):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def __init__(self, cmd, bufsize=-1):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;super(Popen4, self).__init__(cmd, bufsize=bufsize,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shell=True, close_fds=True,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stdin=PIPE, stdout=PIPE, stderr=STDOUT)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def __init__(self, cmd, bufsize=-1, shell=True, close_fds=True,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;stdin=PIPE, stdout=PIPE, stderr=STDOUT, **kwargs):
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;super(Popen4, self).__init__(cmd, bufsize=bufsize, shell=shell,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;close_fds=close_fds, stdin=stdin, stdout=stdout,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;stderr=stderr, **kwargs)
&lt;br&gt;+
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.tochild = self.stdin
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.fromchild = self.stdout
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.childerr = self.stderr
&lt;br&gt;@@ -152,6 +157,17 @@ Found %(result)r&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg = &amp;quot;backup file exists in spite of --nobackup: %s&amp;quot; % path
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failIf(exists, msg)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;def locate_command(self, cmd):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;paths = os.getenv('PATH')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not paths:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return cmd
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parts = cmd.split(' ')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;paths = paths.split(':')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for p in paths:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p = p + os.path.sep + parts[0]
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if os.path.isfile(p):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return ' '.join([p] + parts[1:])
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return ' '.join(parts)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def assertWin32Subprocess(self, cmd):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_in, _out = os.popen4(cmd)
&lt;br&gt;@@ -163,7 +179,8 @@ Found %(result)r&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return rc, output
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def assertPosixSubprocess(self, cmd):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;process = Popen4(cmd)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cmd = self.locate_command(cmd)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;process = Popen4(cmd, env=os.environ)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;process.tochild.close()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;output = process.fromchild.read()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;status = process.wait()
&lt;br&gt;-- 
&lt;br&gt;1.6.4.2
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270072&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-0-3--Preliminary-refactoring-for-Python-3.xx-compat-tp26270075p26270072.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26270076</id>
	<title>[PATCH 2/3] Refactor usage of the &quot;types&quot; module out, per 2to3 -f types</title>
	<published>2009-11-09T09:13:17Z</published>
	<updated>2009-11-09T09:13:17Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">Left out cheetah/Template.py which will need to be refactored
&lt;br&gt;a bit more aggressively, particularly in Template.compile()
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;SetupTools.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 12 +-
&lt;br&gt;&amp;nbsp;cheetah/DummyTransaction.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/SettingsManager.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;8 +-
&lt;br&gt;&amp;nbsp;cheetah/Templates/_SkeletonPage.py &amp;nbsp; | &amp;nbsp; &amp;nbsp;8 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Misc.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 20 +
&lt;br&gt;&amp;nbsp;cheetah/Tests/SyntaxAndOutput.py &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Test.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 +
&lt;br&gt;&amp;nbsp;cheetah/Tests/VerifyType.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;158 ------
&lt;br&gt;&amp;nbsp;cheetah/Tests/unittest_local_copy.py | &amp;nbsp;978 ----------------------------------
&lt;br&gt;&amp;nbsp;cheetah/Tools/MondoReport.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;9 +-
&lt;br&gt;&amp;nbsp;cheetah/Utils/Misc.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 22 +-
&lt;br&gt;&amp;nbsp;cheetah/Utils/VerifyType.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 83 ---
&lt;br&gt;&amp;nbsp;cheetah/Utils/memcache.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 11 +-
&lt;br&gt;&amp;nbsp;cheetah/c/_verifytype.c &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;107 ----
&lt;br&gt;&amp;nbsp;14 files changed, 45 insertions(+), 1377 deletions(-)
&lt;br&gt;&amp;nbsp;create mode 100644 cheetah/Tests/Misc.py
&lt;br&gt;&amp;nbsp;delete mode 100644 cheetah/Tests/VerifyType.py
&lt;br&gt;&amp;nbsp;delete mode 100755 cheetah/Tests/unittest_local_copy.py
&lt;br&gt;&amp;nbsp;delete mode 100644 cheetah/Utils/VerifyType.py
&lt;br&gt;&amp;nbsp;delete mode 100644 cheetah/c/_verifytype.c
&lt;br&gt;&lt;br&gt;diff --git a/SetupTools.py b/SetupTools.py
&lt;br&gt;index 096ee40..0f5377d 100644
&lt;br&gt;--- a/SetupTools.py
&lt;br&gt;+++ b/SetupTools.py
&lt;br&gt;@@ -77,8 +77,8 @@ class mod_install_data(install_data):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;data_files = self.get_inputs()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for entry in data_files:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if type(entry) != types.StringType:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise ValueError, 'The entries in &amp;quot;data_files&amp;quot; must be strings'
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(entry, basestring):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise ValueError('The entries in &amp;quot;data_files&amp;quot; must be strings')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;entry = string.join(string.split(entry, '/'), os.sep)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# entry is a filename or glob pattern
&lt;br&gt;@@ -137,13 +137,7 @@ def run_setup(configurations):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for configuration in configurations:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;kws.update(vars(configuration))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for name, value in kws.items():
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if name[:1] == '_' or \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type(value) not in (types.StringType,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; types.ListType,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; types.TupleType,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; types.DictType,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; types.IntType,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if name[:1] == '_' or not isinstance(value, (basestring, list, tuple, dict, int)):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;del kws[name]
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# Add setup extensions
&lt;br&gt;diff --git a/cheetah/DummyTransaction.py b/cheetah/DummyTransaction.py
&lt;br&gt;index f84ade4..72f8662 100644
&lt;br&gt;--- a/cheetah/DummyTransaction.py
&lt;br&gt;+++ b/cheetah/DummyTransaction.py
&lt;br&gt;@@ -92,7 +92,7 @@ class TransformerResponse(DummyResponse):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;output = super(TransformerResponse, self).getvalue(**kwargs)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self._filter:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_filter = self._filter
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(_filter, types.TypeType):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(_filter, type):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_filter = _filter()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return _filter.filter(output)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return output
&lt;br&gt;diff --git a/cheetah/SettingsManager.py b/cheetah/SettingsManager.py
&lt;br&gt;index dfb396b..07c88a1 100644
&lt;br&gt;--- a/cheetah/SettingsManager.py
&lt;br&gt;+++ b/cheetah/SettingsManager.py
&lt;br&gt;@@ -34,10 +34,8 @@ def mergeNestedDictionaries(dict1, dict2, copy=False, deepcopy=False):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;elif deepcopy:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dict1 = copyModule.deepcopy(dict1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;for key,val in dict2.items():
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if dict1.has_key(key) and type(val) == types.DictType and \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type(dict1[key]) == types.DictType:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;for key,val in dict2.iteritems():
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if dict1.has_key(key) and isinstance(val, dict) and isinstance(dict1[key], dict):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dict1[key] = mergeNestedDictionaries(dict1[key], val)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dict1[key] = val
&lt;br&gt;@@ -96,7 +94,7 @@ class _SettingsCollector(object):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;S = {}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;attrs = vars(mod)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for k, v in attrs.items():
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for k, v in attrs.iteritems():
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (ignoreUnderscored and k.startswith('_')):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;diff --git a/cheetah/Templates/_SkeletonPage.py b/cheetah/Templates/_SkeletonPage.py
&lt;br&gt;index 95a59a7..afb54b2 100644
&lt;br&gt;--- a/cheetah/Templates/_SkeletonPage.py
&lt;br&gt;+++ b/cheetah/Templates/_SkeletonPage.py
&lt;br&gt;@@ -115,8 +115,8 @@ class _SkeletonPage(Template):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SRC filename rather than a code string.&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;javascriptTagsTxt = []
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for key, details in self._javascriptTags.items():
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if type(details) not in (types.ListType, types.TupleType):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for key, details in self._javascriptTags.iteritems():
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not isinstance(details, (list, tuple)):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;details = ['',details]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;javascriptTagsTxt += ['&amp;lt;script language=&amp;quot;JavaScript', str(details[0]),
&lt;br&gt;@@ -124,8 +124,8 @@ class _SkeletonPage(Template):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;str(details[0]), '\n//--&amp;gt;&amp;lt;/script&amp;gt;\n']
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for key, details in self._javascriptLibs.items():
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if type(details) not in (types.ListType, types.TupleType):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for key, details in self._javascriptLibs.iteritems():
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not isinstance(details, (list, tuple)):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;details = ['',details]
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;javascriptTagsTxt += ['&amp;lt;script language=&amp;quot;JavaScript', str(details[0]),
&lt;br&gt;diff --git a/cheetah/Tests/Misc.py b/cheetah/Tests/Misc.py
&lt;br&gt;new file mode 100644
&lt;br&gt;index 0000000..9ea66f0
&lt;br&gt;--- /dev/null
&lt;br&gt;+++ b/cheetah/Tests/Misc.py
&lt;br&gt;@@ -0,0 +1,20 @@
&lt;br&gt;+#!/usr/bin/env python
&lt;br&gt;+
&lt;br&gt;+import unittest
&lt;br&gt;+
&lt;br&gt;+from Cheetah import SettingsManager
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+class SettingsManagerTests(unittest.TestCase):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;def test_mergeDictionaries(self):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;left = {'foo' : 'bar', 'abc' : {'a' : 1, 'b' : 2, 'c' : (3,)}}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;right = {'xyz' : (10, 9)}
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;expect = {'xyz': (10, 9), 'foo': 'bar', 'abc': {'a': 1, 'c': (3,), 'b': 2}}
&lt;br&gt;+
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result = SettingsManager.mergeNestedDictionaries(left, right)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals(result, expect)
&lt;br&gt;+
&lt;br&gt;+
&lt;br&gt;+if __name__ == '__main__':
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;unittest.main()
&lt;br&gt;+
&lt;br&gt;diff --git a/cheetah/Tests/SyntaxAndOutput.py b/cheetah/Tests/SyntaxAndOutput.py
&lt;br&gt;index 6bd6963..0702ded 100644
&lt;br&gt;--- a/cheetah/Tests/SyntaxAndOutput.py
&lt;br&gt;+++ b/cheetah/Tests/SyntaxAndOutput.py
&lt;br&gt;@@ -3199,7 +3199,7 @@ else:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;def install_eols():
&lt;br&gt;- &amp;nbsp; &amp;nbsp;klasses = [v for v in globals().values() if isinstance(v, (types.ClassType, types.TypeType)) and issubclass(v, unittest.TestCase)]
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;klasses = [v for v in globals().values() if isinstance(v, type) and issubclass(v, unittest.TestCase)]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for klass in klasses:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name = klass.__name__ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if hasattr(klass,'convertEOLs') and klass.convertEOLs:
&lt;br&gt;diff --git a/cheetah/Tests/Test.py b/cheetah/Tests/Test.py
&lt;br&gt;index 13b0171..872de8e 100755
&lt;br&gt;--- a/cheetah/Tests/Test.py
&lt;br&gt;+++ b/cheetah/Tests/Test.py
&lt;br&gt;@@ -15,6 +15,7 @@ import unittest
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;import SyntaxAndOutput
&lt;br&gt;&amp;nbsp;import NameMapper
&lt;br&gt;+import Misc
&lt;br&gt;&amp;nbsp;import Filters
&lt;br&gt;&amp;nbsp;import Template
&lt;br&gt;&amp;nbsp;import Cheps
&lt;br&gt;@@ -32,6 +33,7 @@ suites = [
&lt;br&gt;&amp;nbsp; &amp;nbsp; #unittest.findTestCases(Cheps),
&lt;br&gt;&amp;nbsp; &amp;nbsp; unittest.findTestCases(Regressions),
&lt;br&gt;&amp;nbsp; &amp;nbsp; unittest.findTestCases(Unicode),
&lt;br&gt;+ &amp;nbsp; unittest.findTestCases(Misc),
&lt;br&gt;&amp;nbsp;]
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;if not sys.platform.startswith('java'):
&lt;br&gt;diff --git a/cheetah/Tests/VerifyType.py b/cheetah/Tests/VerifyType.py
&lt;br&gt;deleted file mode 100644
&lt;br&gt;index a581d70..0000000
&lt;br&gt;--- a/cheetah/Tests/VerifyType.py
&lt;br&gt;+++ /dev/null
&lt;br&gt;@@ -1,158 +0,0 @@
&lt;br&gt;-#!/usr/bin/env python 
&lt;br&gt;-import unittest
&lt;br&gt;-
&lt;br&gt;-from Cheetah.Utils import VerifyType
&lt;br&gt;-from Cheetah import _verifytype
&lt;br&gt;-
&lt;br&gt;-class VerifyType_Test(unittest.TestCase):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_Verified(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = 'foo'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = [str, unicode]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rc = VerifyType.VerifyType(arg, 'arg', legalTypes, 'string') 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assert rc
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except TypeError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.fail('Should not have raised a TypeError here')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rc = _verifytype.verifyType(arg, 'arg', legalTypes, 'string')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assert rc
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except TypeError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.fail('Should not have raised a TypeError here')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_Unverified(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = 'foo'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = [list, dict]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, VerifyType.VerifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'list or dict')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'list or dict')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_IncorrectNumberOfArgs(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = 'foo'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = [str, unicode]
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyType)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyType)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyType, arg)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyType, arg)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string', 'errmsgExtra', 'one more')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string', 'errmsgExtra', 'one more')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_LegalTypesNotIterable(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = 'foo'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = 1
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyType, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string')
&lt;br&gt;-
&lt;br&gt;-class FakeClass(dict):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;pass
&lt;br&gt;-
&lt;br&gt;-class VerifyTypeClass_Test(unittest.TestCase):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_VerifiedClass(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = FakeClass
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = [type]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rc = VerifyType.VerifyTypeClass(arg, 'arg', legalTypes, '', dict) 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assert rc
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except TypeError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.fail('Should not have raised a TypeError here')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rc = _verifytype.verifyTypeClass(arg, 'arg', legalTypes, 'foo', dict)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assert rc
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except TypeError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.fail('Should not have raised a TypeError here')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_UnverifiedClass(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = FakeClass
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = [type]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes, 'subclass of list', list)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes, 'subclass of list', list)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_Verified(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = 'foo'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = [str, unicode]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rc = VerifyType.VerifyTypeClass(arg, 'arg', legalTypes, 'string', int) 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assert rc
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except TypeError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.fail('Should not have raised a TypeError here')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rc = _verifytype.verifyTypeClass(arg, 'arg', legalTypes, 'string', int)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assert rc
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except TypeError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.fail('Should not have raised a TypeError here')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_Unverified(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = 'foo'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = [list, dict]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'list or dict', int)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'list or dict', int)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_IncorrectNumberOfArgs(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = 'foo'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = [str, unicode]
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyTypeClass)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyTypeClass)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyTypeClass, arg)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyTypeClass, arg)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string', int, 'errmsgExtra', 'one more')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string', int, 'errmsgExtra', 'one more')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def test_LegalTypesNotIterable(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arg = 'foo'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;legalTypes = 1
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, &amp;nbsp;VerifyType.VerifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string', int)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failUnlessRaises(TypeError, _verifytype.verifyTypeClass, arg,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'arg', legalTypes, 'string', int)
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-if __name__ == '__main__':
&lt;br&gt;- &amp;nbsp; &amp;nbsp;unittest.main()
&lt;br&gt;diff --git a/cheetah/Tests/unittest_local_copy.py b/cheetah/Tests/unittest_local_copy.py
&lt;br&gt;deleted file mode 100755
&lt;br&gt;index 11d2d2c..0000000
&lt;br&gt;--- a/cheetah/Tests/unittest_local_copy.py
&lt;br&gt;+++ /dev/null
&lt;br&gt;@@ -1,978 +0,0 @@
&lt;br&gt;-#!/usr/bin/env python
&lt;br&gt;-&amp;quot;&amp;quot;&amp;quot; This is a hacked version of PyUnit that extends its reporting capabilities
&lt;br&gt;-with optional meta data on the test cases. &amp;nbsp;It also makes it possible to
&lt;br&gt;-separate the standard and error output streams in TextTestRunner.
&lt;br&gt;-
&lt;br&gt;-It's a hack rather than a set of subclasses because a) Steve had used double
&lt;br&gt;-underscore private attributes for some things I needed access to, and b) the
&lt;br&gt;-changes affected so many classes that it was easier just to hack it.
&lt;br&gt;-
&lt;br&gt;-The changes are in the following places:
&lt;br&gt;-TestCase:
&lt;br&gt;- &amp;nbsp; - minor refactoring of &amp;nbsp;__init__ and __call__ internals
&lt;br&gt;- &amp;nbsp; - added some attributes and methods for storing and retrieving meta data
&lt;br&gt;-
&lt;br&gt;-_TextTestResult
&lt;br&gt;- &amp;nbsp; - refactored the stream handling
&lt;br&gt;- &amp;nbsp; - incorporated all the output code from TextTestRunner
&lt;br&gt;- &amp;nbsp; - made the output of FAIL and ERROR information more flexible and
&lt;br&gt;- &amp;nbsp; &amp;nbsp; incorporated the new meta data from TestCase
&lt;br&gt;- &amp;nbsp; - added a flag called 'explain' to __init__ that controls whether the new '
&lt;br&gt;- &amp;nbsp; &amp;nbsp; explanation' &amp;nbsp; meta data from TestCase is printed along with tracebacks
&lt;br&gt;- &amp;nbsp; 
&lt;br&gt;-TextTestRunner
&lt;br&gt;- &amp;nbsp; - delegated all output to _TextTestResult
&lt;br&gt;- &amp;nbsp; - added 'err' and 'explain' to the __init__ signature to match the changes
&lt;br&gt;- &amp;nbsp; &amp;nbsp; in _TextTestResult
&lt;br&gt;- &amp;nbsp; 
&lt;br&gt;-TestProgram
&lt;br&gt;- &amp;nbsp; - added -e and --explain as flags on the command line
&lt;br&gt;-
&lt;br&gt;--- Tavis Rudd &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270076&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tavis@...&lt;/a&gt;&amp;gt; (Sept 28th, 2001)
&lt;br&gt;-
&lt;br&gt;-- _TestTextResult.printErrorList(): print blank line after each traceback
&lt;br&gt;-
&lt;br&gt;--- Mike Orr &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270076&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mso@...&lt;/a&gt;&amp;gt; (Nov 11, 2002)
&lt;br&gt;-
&lt;br&gt;-TestCase methods copied from unittest in Python 2.3:
&lt;br&gt;- &amp;nbsp;- .assertAlmostEqual(first, second, places=7, msg=None): to N decimal places.
&lt;br&gt;- &amp;nbsp;- .failIfAlmostEqual(first, second, places=7, msg=None)
&lt;br&gt;-
&lt;br&gt;--- Mike Orr (Jan 5, 2004)
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-Below is the original docstring for unittest.
&lt;br&gt;----------------------------------------------------------------------------
&lt;br&gt;-Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's
&lt;br&gt;-Smalltalk testing framework.
&lt;br&gt;-
&lt;br&gt;-This module contains the core framework classes that form the basis of
&lt;br&gt;-specific test cases and suites (TestCase, TestSuite etc.), and also a
&lt;br&gt;-text-based utility class for running the tests and reporting the results
&lt;br&gt;-(TextTestRunner).
&lt;br&gt;-
&lt;br&gt;-Simple usage:
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;import unittest
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;class IntegerArithmenticTestCase(unittest.TestCase):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def testAdd(self): &amp;nbsp;## test method names begin 'test*'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals((1 + 2), 3)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals(0 + 1, 1)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def testMultiply(self);
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals((0 * 10), 0)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.assertEquals((5 * 8), 40)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if __name__ == '__main__':
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unittest.main()
&lt;br&gt;-
&lt;br&gt;-Further information is available in the bundled documentation, and from
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp;&lt;a href=&quot;http://pyunit.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pyunit.sourceforge.net/&lt;/a&gt;&lt;br&gt;-
&lt;br&gt;-Copyright (c) 1999, 2000, 2001 Steve Purcell
&lt;br&gt;-This module is free software, and you may redistribute it and/or modify
&lt;br&gt;-it under the same terms as Python itself, so long as this copyright message
&lt;br&gt;-and disclaimer are retained in their original form.
&lt;br&gt;-
&lt;br&gt;-IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
&lt;br&gt;-SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
&lt;br&gt;-THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
&lt;br&gt;-DAMAGE.
&lt;br&gt;-
&lt;br&gt;-THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
&lt;br&gt;-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
&lt;br&gt;-PARTICULAR PURPOSE. &amp;nbsp;THE CODE PROVIDED HEREUNDER IS ON AN &amp;quot;AS IS&amp;quot; BASIS,
&lt;br&gt;-AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
&lt;br&gt;-SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
&lt;br&gt;-&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;-
&lt;br&gt;-__author__ = &amp;quot;Steve Purcell&amp;quot;
&lt;br&gt;-__email__ = &amp;quot;stephen_purcell at yahoo dot com&amp;quot;
&lt;br&gt;-__revision__ = &amp;quot;$Revision: 1.11 $&amp;quot;[11:-2]
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-##################################################
&lt;br&gt;-## DEPENDENCIES ##
&lt;br&gt;-
&lt;br&gt;-import os
&lt;br&gt;-import re
&lt;br&gt;-import string
&lt;br&gt;-import sys
&lt;br&gt;-import time
&lt;br&gt;-import traceback
&lt;br&gt;-import types
&lt;br&gt;-import pprint
&lt;br&gt;-
&lt;br&gt;-##################################################
&lt;br&gt;-## CONSTANTS &amp; GLOBALS
&lt;br&gt;-
&lt;br&gt;-try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;True,False
&lt;br&gt;-except NameError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;True, False = (1==1),(1==0)
&lt;br&gt;-
&lt;br&gt;-##############################################################################
&lt;br&gt;-# Test framework core
&lt;br&gt;-##############################################################################
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-class TestResult:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Holder for test result information.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Test results are automatically managed by the TestCase and TestSuite
&lt;br&gt;- &amp;nbsp; &amp;nbsp;classes, and do not need to be explicitly manipulated by writers of tests.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Each instance holds the total number of tests run, and collections of
&lt;br&gt;- &amp;nbsp; &amp;nbsp;failures and errors that occurred among those test runs. The collections
&lt;br&gt;- &amp;nbsp; &amp;nbsp;contain tuples of (testcase, exceptioninfo), where exceptioninfo is a
&lt;br&gt;- &amp;nbsp; &amp;nbsp;tuple of values as returned by sys.exc_info().
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __init__(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failures = []
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.errors = []
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.testsRun = 0
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.shouldStop = 0
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def startTest(self, test):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Called when the given test is about to be run&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.testsRun = self.testsRun + 1
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def stopTest(self, test):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Called when the given test has been run&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pass
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def addError(self, test, err):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Called when an error has occurred&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.errors.append((test, err))
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def addFailure(self, test, err):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Called when a failure has occurred&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.failures.append((test, err))
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def addSuccess(self, test):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Called when a test has completed successfully&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pass
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def wasSuccessful(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Tells whether or not this result was a success&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return len(self.failures) == len(self.errors) == 0
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def stop(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Indicates that the tests should be aborted&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.shouldStop = 1
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __repr__(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;&amp;lt;%s run=%i errors=%i failures=%i&amp;gt;&amp;quot; % \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (self.__class__, self.testsRun, len(self.errors),
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;len(self.failures))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;-class TestCase:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;A class whose instances are single test cases.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;By default, the test code itself should be placed in a method named
&lt;br&gt;- &amp;nbsp; &amp;nbsp;'runTest'.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;If the fixture may be used for many test cases, create as
&lt;br&gt;- &amp;nbsp; &amp;nbsp;many test methods as are needed. When instantiating such a TestCase
&lt;br&gt;- &amp;nbsp; &amp;nbsp;subclass, specify in the constructor arguments the name of the test method
&lt;br&gt;- &amp;nbsp; &amp;nbsp;that the instance is to execute.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Test authors should subclass TestCase for their own tests. Construction
&lt;br&gt;- &amp;nbsp; &amp;nbsp;and deconstruction of the test's environment ('fixture') can be
&lt;br&gt;- &amp;nbsp; &amp;nbsp;implemented by overriding the 'setUp' and 'tearDown' methods respectively.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;If it is necessary to override the __init__ method, the base class
&lt;br&gt;- &amp;nbsp; &amp;nbsp;__init__ method must always be called. It is important that subclasses
&lt;br&gt;- &amp;nbsp; &amp;nbsp;should not change the signature of their __init__ method, since instances
&lt;br&gt;- &amp;nbsp; &amp;nbsp;of the classes are instantiated automatically by parts of the framework
&lt;br&gt;- &amp;nbsp; &amp;nbsp;in order to be run.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;# This attribute determines which exception will be raised when
&lt;br&gt;- &amp;nbsp; &amp;nbsp;# the instance's assertion methods fail; test methods raising this
&lt;br&gt;- &amp;nbsp; &amp;nbsp;# exception will be deemed to have 'failed' rather than 'errored'
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;failureException = AssertionError
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;# the name of the fixture. &amp;nbsp;Used for displaying meta data about the test
&lt;br&gt;- &amp;nbsp; &amp;nbsp;name = None
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __init__(self, methodName='runTest'):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Create an instance of the class that will use the named test
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;method when executed. Raises a ValueError if the instance does
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;not have a method with the specified name.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._testMethodName = methodName
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._setupTestMethod()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._setupMetaData()
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def _setupTestMethod(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._testMethod = getattr(self, self._testMethodName)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except AttributeError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise ValueError, &amp;quot;no such test method in %s: %s&amp;quot; % \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(self.__class__, self._testMethodName)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## meta data methods
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def _setupMetaData(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Setup the default meta data for the test case:
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- id: self.__class__.__name__ + testMethodName OR self.name + testMethodName
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- description: 1st line of Class docstring + 1st line of method docstring
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- explanation: rest of Class docstring + rest of method docstring
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;testDoc = self._testMethod.__doc__ or '\n'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;testDocLines = testDoc.splitlines()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;testDescription = testDocLines[0].strip() 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if len(testDocLines) &amp;gt; 1:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;testExplanation = '\n'.join(
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ln.strip() for ln in testDocLines[1:]]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;).strip()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;testExplanation = ''
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fixtureDoc = self.__doc__ or '\n'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fixtureDocLines = fixtureDoc.splitlines()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fixtureDescription = fixtureDocLines[0].strip()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if len(fixtureDocLines) &amp;gt; 1:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fixtureExplanation = '\n'.join(
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ln.strip() for ln in fixtureDocLines[1:]]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;).strip()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fixtureExplanation = ''
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not self.name:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.name = self.__class__
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._id = &amp;quot;%s.%s&amp;quot; % (self.name, self._testMethodName)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not fixtureDescription:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._description = testDescription
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._description = fixtureDescription + ', ' + testDescription
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not fixtureExplanation:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._explanation = testExplanation
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._explanation = ['Fixture Explanation:',
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '--------------------',
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fixtureExplanation,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '',
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Test Explanation:',
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '-----------------',
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; testExplanation
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._explanation = '\n'.join(self._explanation)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def id(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self._id
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def setId(self, id):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._id = id
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def describe(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Returns a one-line description of the test, or None if no
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;description has been provided.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The default implementation of this method returns the first line of
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the specified test method's docstring.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self._description
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;shortDescription = describe
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def setDescription(self, descr):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._description = descr
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def explain(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self._explanation
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def setExplanation(self, expln):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._explanation = expln
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## core methods
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def setUp(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Hook method for setting up the test fixture before exercising it.&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pass
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def run(self, result=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self(result)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def tearDown(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Hook method for deconstructing the test fixture after testing it.&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pass
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def debug(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Run the test without collecting errors in a TestResult&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.setUp()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._testMethod()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.tearDown()
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## internal methods
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def defaultTestResult(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return TestResult()
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __call__(self, result=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if result is None:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result = self.defaultTestResult()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.startTest(self)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.setUp()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.addError(self, self.__exc_info())
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ok = 0
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._testMethod()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ok = 1
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except self.failureException, e:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.addFailure(self, self.__exc_info())
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.addError(self, self.__exc_info())
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.tearDown()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.addError(self, self.__exc_info())
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ok = 0
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ok:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.addSuccess(self)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;finally:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.stopTest(self)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return result
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def countTestCases(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 1
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __str__(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;%s (%s)&amp;quot; % (self._testMethodName, self.__class__)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __repr__(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;&amp;lt;%s testMethod=%s&amp;gt;&amp;quot; % \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (self.__class__, self._testMethodName)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __exc_info(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Return a version of sys.exc_info() with the traceback frame
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; minimised; usually the top level of the traceback frame is not
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; needed.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exctype, excvalue, tb = sys.exc_info()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if sys.platform[:4] == 'java': ## tracebacks look different in Jython
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (exctype, excvalue, tb)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;newtb = tb.tb_next
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if newtb is None:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (exctype, excvalue, tb)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (exctype, excvalue, newtb)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## methods for use by the test cases
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def fail(self, msg=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Fail immediately, with the given message.&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise self.failureException, msg
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def failIf(self, expr, msg=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Fail the test if the expression is true.&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if expr: raise self.failureException, msg
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def failUnless(self, expr, msg=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Fail the test unless the expression is true.&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not expr: raise self.failureException, msg
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def failUnlessRaises(self, excClass, callableObj, *args, **kwargs):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Fail unless an exception of class excClass is thrown
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; by callableObj when invoked with arguments args and keyword
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; arguments kwargs. If a different type of exception is
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; thrown, it will not be caught, and the test case will be
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; deemed to have suffered an error, exactly as for an
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unexpected exception.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;apply(callableObj, args, kwargs)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except excClass:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if hasattr(excClass,'__name__'): excName = excClass.__name__
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else: excName = str(excClass)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise self.failureException, excName
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def failUnlessEqual(self, first, second, msg=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Fail if the two objects are unequal as determined by the '!='
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if first != second:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise self.failureException, (msg or '%s != %s' % (first, second))
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def failIfEqual(self, first, second, msg=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Fail if the two objects are equal as determined by the '=='
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; operator.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if first == second:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise self.failureException, (msg or '%s == %s' % (first, second))
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def failUnlessAlmostEqual(self, first, second, places=7, msg=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Fail if the two objects are unequal as determined by their
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; difference rounded to the given number of decimal places
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (default 7) and comparing to zero.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Note that decimal places (from zero) is usually not the same
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; as significant digits (measured from the most signficant digit).
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if round(second-first, places) != 0:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise self.failureException, \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(msg or '%s != %s within %s places' % (`first`, `second`, `places` ))
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def failIfAlmostEqual(self, first, second, places=7, msg=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Fail if the two objects are equal as determined by their
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; difference rounded to the given number of decimal places
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (default 7) and comparing to zero.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Note that decimal places (from zero) is usually not the same
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; as significant digits (measured from the most signficant digit).
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if round(second-first, places) == 0:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise self.failureException, \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(msg or '%s == %s within %s places' % (`first`, `second`, `places`))
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## aliases
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;assertEqual = assertEquals = failUnlessEqual
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;assertNotEqual = assertNotEquals = failIfEqual
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;assertAlmostEqual = assertAlmostEquals = failUnlessAlmostEqual
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;assertNotAlmostEqual = assertNotAlmostEquals = failIfAlmostEqual
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;assertRaises = failUnlessRaises
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;assert_ = failUnless
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-class FunctionTestCase(TestCase):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;A test case that wraps a test function.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;This is useful for slipping pre-existing test functions into the
&lt;br&gt;- &amp;nbsp; &amp;nbsp;PyUnit framework. Optionally, set-up and tidy-up functions can be
&lt;br&gt;- &amp;nbsp; &amp;nbsp;supplied. As with TestCase, the tidy-up ('tearDown') function will
&lt;br&gt;- &amp;nbsp; &amp;nbsp;always be called if the set-up ('setUp') function ran successfully.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __init__(self, testFunc, setUp=None, tearDown=None,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; description=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TestCase.__init__(self)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.__setUpFunc = setUp
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.__tearDownFunc = tearDown
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.__testFunc = testFunc
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.__description = description
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def setUp(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self.__setUpFunc is not None:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.__setUpFunc()
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def tearDown(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self.__tearDownFunc is not None:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.__tearDownFunc()
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def runTest(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.__testFunc()
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def id(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self.__testFunc.__name__
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __str__(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;%s (%s)&amp;quot; % (self.__class__, self.__testFunc.__name__)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __repr__(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;&amp;lt;%s testFunc=%s&amp;gt;&amp;quot; % (self.__class__, self.__testFunc)
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def describe(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self.__description is not None: return self.__description
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;doc = self.__testFunc.__doc__
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return doc and string.strip(string.split(doc, &amp;quot;\n&amp;quot;)[0]) or None
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## aliases
&lt;br&gt;- &amp;nbsp; &amp;nbsp;shortDescription = describe
&lt;br&gt;-
&lt;br&gt;-class TestSuite:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;A test suite is a composite test consisting of a number of TestCases.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;For use, create an instance of TestSuite, then add test case instances.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;When all tests have been added, the suite can be passed to a test
&lt;br&gt;- &amp;nbsp; &amp;nbsp;runner, such as TextTestRunner. It will run the individual test cases
&lt;br&gt;- &amp;nbsp; &amp;nbsp;in the order in which they were added, aggregating the results. When
&lt;br&gt;- &amp;nbsp; &amp;nbsp;subclassing, do not forget to call the base class constructor.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __init__(self, tests=(), suiteName=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._tests = []
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._testMap = {}
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.suiteName = suiteName
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.addTests(tests)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __repr__(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;&amp;lt;%s tests=%s&amp;gt;&amp;quot; % (self.__class__, pprint.pformat(self._tests))
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;__str__ = __repr__
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def countTestCases(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cases = 0
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for test in self._tests:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cases = cases + test.countTestCases()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return cases
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def addTest(self, test):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._tests.append(test)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(test, TestSuite) and test.suiteName:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name = test.suiteName
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif isinstance(test, TestCase):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#print test, test._testMethodName
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name = test._testMethodName
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name = test.__class__.__name__
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._testMap[name] = test
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def addTests(self, tests):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for test in tests:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.addTest(test)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def getTestForName(self, name):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self._testMap[name]
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def run(self, result):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self(result)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __call__(self, result):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for test in self._tests:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if result.shouldStop:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test(result)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return result
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def debug(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Run the tests without collecting errors in a TestResult&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for test in self._tests: test.debug()
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-##############################################################################
&lt;br&gt;-# Text UI
&lt;br&gt;-##############################################################################
&lt;br&gt;-
&lt;br&gt;-class StreamWrapper:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __init__(self, out=sys.stdout, err=sys.stderr):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._streamOut = out
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._streamErr = err
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def write(self, txt):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._streamOut.write(txt)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._streamOut.flush()
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def writeln(self, *lines):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for line in lines:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.write(line + '\n')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not lines:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.write('\n')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def writeErr(self, txt):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._streamErr.write(txt)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def writelnErr(self, *lines):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for line in lines:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeErr(line + '\n')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not lines:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeErr('\n')
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-class _TextTestResult(TestResult, StreamWrapper):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;_separatorWidth = 70
&lt;br&gt;- &amp;nbsp; &amp;nbsp;_sep1 = '='
&lt;br&gt;- &amp;nbsp; &amp;nbsp;_sep2 = '-'
&lt;br&gt;- &amp;nbsp; &amp;nbsp;_errorSep1 = '*'
&lt;br&gt;- &amp;nbsp; &amp;nbsp;_errorSep2 = '-'
&lt;br&gt;- &amp;nbsp; &amp;nbsp;_errorSep3 = ''
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __init__(self,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream=sys.stdout,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; errStream=sys.stderr,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verbosity=1,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; explain=False):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TestResult.__init__(self)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;StreamWrapper.__init__(self, out=stream, err=errStream) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._verbosity = verbosity
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._showAll = verbosity &amp;gt; 1
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._dots = (verbosity == 1)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._explain = explain
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## startup and shutdown methods
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def beginTests(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._startTime = time.time()
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def endTests(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._stopTime = time.time()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._timeTaken = float(self._stopTime - self._startTime)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def stop(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.shouldStop = 1
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## methods called for each test
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def startTest(self, test):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TestResult.startTest(self, test)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self._showAll:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.write(&amp;quot;%s (%s)&amp;quot; %( test.id(), test.describe() ) )
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.write(&amp;quot; ... &amp;quot;)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def addSuccess(self, test):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TestResult.addSuccess(self, test)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self._showAll:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln(&amp;quot;ok&amp;quot;)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif self._dots:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.write('.')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def addError(self, test, err):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TestResult.addError(self, test, err)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self._showAll:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln(&amp;quot;ERROR&amp;quot;)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif self._dots:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.write('E')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if err[0] is KeyboardInterrupt:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.stop()
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def addFailure(self, test, err):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TestResult.addFailure(self, test, err)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self._showAll:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln(&amp;quot;FAIL&amp;quot;)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif self._dots:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.write('F')
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## display methods
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def summarize(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.printErrors()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeSep2()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;run = self.testsRun
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln(&amp;quot;Ran %d test%s in %.3fs&amp;quot; %
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(run, run == 1 and &amp;quot;&amp;quot; or &amp;quot;s&amp;quot;, self._timeTaken))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not self.wasSuccessful():
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeErr(&amp;quot;FAILED (&amp;quot;)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;failed, errored = map(len, (self.failures, self.errors))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if failed:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeErr(&amp;quot;failures=%d&amp;quot; % failed)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if errored:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if failed: self.writeErr(&amp;quot;, &amp;quot;)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeErr(&amp;quot;errors=%d&amp;quot; % errored)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writelnErr(&amp;quot;)&amp;quot;)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writelnErr(&amp;quot;OK&amp;quot;)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def writeSep1(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln(self._sep1 * self._separatorWidth)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def writeSep2(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln(self._sep2 * self._separatorWidth)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def writeErrSep1(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln(self._errorSep1 * self._separatorWidth)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def writeErrSep2(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln(self._errorSep2 * self._separatorWidth)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def printErrors(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self._dots or self._showAll:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeln()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.printErrorList('ERROR', self.errors)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.printErrorList('FAIL', self.failures)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def printErrorList(self, flavour, errors):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for test, err in errors:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeErrSep1()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writelnErr(&amp;quot;%s %s (%s)&amp;quot; % (flavour, test.id(), test.describe() ))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self._explain:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;expln = test.explain()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if expln:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeErrSep2()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeErr( expln )
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writelnErr()
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writeErrSep2()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for line in apply(traceback.format_exception, err):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for l in line.split(&amp;quot;\n&amp;quot;)[:-1]:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writelnErr(l)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.writelnErr(&amp;quot;&amp;quot;)
&lt;br&gt;-
&lt;br&gt;-class TextTestRunner:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __init__(self, 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stream=sys.stdout,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; errStream=sys.stderr,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verbosity=1,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; explain=False):
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._out = stream
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._err = errStream
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._verbosity = verbosity
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._explain = explain
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## main methods
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def run(self, test):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result = self._makeResult()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.beginTests()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test( result )
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.endTests() &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result.summarize()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return result
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;## internal methods
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def _makeResult(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return _TextTestResult(stream=self._out,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; errStream=self._err,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verbosity=self._verbosity,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; explain=self._explain,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;-
&lt;br&gt;-##############################################################################
&lt;br&gt;-# Locating and loading tests
&lt;br&gt;-##############################################################################
&lt;br&gt;-
&lt;br&gt;-class TestLoader:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;This class is responsible for loading tests according to various
&lt;br&gt;- &amp;nbsp; &amp;nbsp;criteria and returning them wrapped in a Test
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;testMethodPrefix = 'test'
&lt;br&gt;- &amp;nbsp; &amp;nbsp;sortTestMethodsUsing = cmp
&lt;br&gt;- &amp;nbsp; &amp;nbsp;suiteClass = TestSuite
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def loadTestsFromTestCase(self, testCaseClass):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Return a suite of all tests cases contained in testCaseClass&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self.suiteClass(tests=map(testCaseClass,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.getTestCaseNames(testCaseClass)),
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; suiteName=testCaseClass.__name__)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def loadTestsFromModule(self, module):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Return a suite of all tests cases contained in the given module&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tests = []
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for name in dir(module):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;obj = getattr(module, name)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if type(obj) == types.ClassType and issubclass(obj, TestCase):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tests.append(self.loadTestsFromTestCase(obj))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self.suiteClass(tests)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def loadTestsFromName(self, name, module=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Return a suite of all tests cases given a string specifier.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The name may resolve either to a module, a test case class, a
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test method within a test case class, or a callable object which
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;returns a TestCase or TestSuite instance.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The method optionally resolves the names relative to a given module.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parts = string.split(name, '.')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if module is None:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not parts:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise ValueError, &amp;quot;incomplete test name: %s&amp;quot; % name
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parts_copy = parts[:]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while parts_copy:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;module = __import__(string.join(parts_copy,'.'))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except ImportError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;del parts_copy[-1]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not parts_copy: raise
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;parts = parts[1:]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;obj = module
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for part in parts:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(obj, TestSuite):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;obj = obj.getTestForName(part)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;obj = getattr(obj, part)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if type(obj) == types.ModuleType:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self.loadTestsFromModule(obj)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif type(obj) == types.ClassType and issubclass(obj, TestCase):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self.loadTestsFromTestCase(obj)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif type(obj) == types.UnboundMethodType:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return obj.im_class(obj.__name__)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif isinstance(obj, TestSuite):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return obj
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif isinstance(obj, TestCase):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return obj
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif callable(obj):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;test = obj()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not isinstance(test, TestCase) and \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; not isinstance(test, TestSuite):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise ValueError, \
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;calling %s returned %s, not a test&amp;quot; %(obj,test)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return test
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise ValueError, &amp;quot;don't know how to make test from: %s&amp;quot; % obj
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def loadTestsFromNames(self, names, module=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Return a suite of all tests cases found using the given sequence
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;of string specifiers. See 'loadTestsFromName()'.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;suites = []
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for name in names:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;suites.append(self.loadTestsFromName(name, module))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return self.suiteClass(suites)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def getTestCaseNames(self, testCaseClass):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Return a sorted sequence of method names found within testCaseClass.
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;testFnNames = [fn for fn in dir(testCaseClass) if fn.startswith(self.testMethodPrefix)]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if hasattr(testCaseClass, 'runTest'):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;testFnNames.append('runTest')
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for baseclass in testCaseClass.__bases__:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for testFnName in self.getTestCaseNames(baseclass):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if testFnName not in testFnNames: &amp;nbsp;# handle overridden methods
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;testFnNames.append(testFnName)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self.sortTestMethodsUsing:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;testFnNames.sort(self.sortTestMethodsUsing)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return testFnNames
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-defaultTestLoader = TestLoader()
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-##############################################################################
&lt;br&gt;-# Patches for old functions: these functions should be considered obsolete
&lt;br&gt;-##############################################################################
&lt;br&gt;-
&lt;br&gt;-def _makeLoader(prefix, sortUsing, suiteClass=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;loader = TestLoader()
&lt;br&gt;- &amp;nbsp; &amp;nbsp;loader.sortTestMethodsUsing = sortUsing
&lt;br&gt;- &amp;nbsp; &amp;nbsp;loader.testMethodPrefix = prefix
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if suiteClass: loader.suiteClass = suiteClass
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return loader
&lt;br&gt;-
&lt;br&gt;-def getTestCaseNames(testCaseClass, prefix, sortUsing=cmp):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return _makeLoader(prefix, sortUsing).getTestCaseNames(testCaseClass)
&lt;br&gt;-
&lt;br&gt;-def makeSuite(testCaseClass, prefix='test', sortUsing=cmp, suiteClass=TestSuite):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromTestCase(testCaseClass)
&lt;br&gt;-
&lt;br&gt;-def findTestCases(module, prefix='test', sortUsing=cmp, suiteClass=TestSuite):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromModule(module)
&lt;br&gt;-
&lt;br&gt;-##############################################################################
&lt;br&gt;-# Facilities for running tests from the command line
&lt;br&gt;-##############################################################################
&lt;br&gt;-
&lt;br&gt;-class TestProgram:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;A command-line program that runs a set of tests; this is primarily
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; for making test modules conveniently executable.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;USAGE = &amp;quot;&amp;quot;&amp;quot;\
&lt;br&gt;-Usage: %(progName)s [options] [test] [...]
&lt;br&gt;-
&lt;br&gt;-Options:
&lt;br&gt;- &amp;nbsp;-h, --help &amp;nbsp; &amp;nbsp; &amp;nbsp; Show this message
&lt;br&gt;- &amp;nbsp;-v, --verbose &amp;nbsp; &amp;nbsp;Verbose output
&lt;br&gt;- &amp;nbsp;-q, --quiet &amp;nbsp; &amp;nbsp; &amp;nbsp;Minimal output
&lt;br&gt;- &amp;nbsp;-e, --expain &amp;nbsp; &amp;nbsp; Output extra test details if there is a failure or error
&lt;br&gt;- &amp;nbsp;
&lt;br&gt;-Examples:
&lt;br&gt;- &amp;nbsp;%(progName)s &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - run default set of tests
&lt;br&gt;- &amp;nbsp;%(progName)s MyTestSuite &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - run suite 'MyTestSuite'
&lt;br&gt;- &amp;nbsp;%(progName)s MyTestSuite.MyTestCase &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- run suite 'MyTestSuite'
&lt;br&gt;- &amp;nbsp;%(progName)s MyTestCase.testSomething &amp;nbsp; &amp;nbsp; &amp;nbsp;- run MyTestCase.testSomething
&lt;br&gt;- &amp;nbsp;%(progName)s MyTestCase &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- run all 'test*' test methods
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in MyTestCase
&lt;br&gt;-&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def __init__(self, module='__main__', defaultTest=None,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; argv=None, testRunner=None, testLoader=defaultTestLoader,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; testSuite=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if type(module) == type(''):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.module = __import__(module)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for part in string.split(module,'.')[1:]:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.module = getattr(self.module, part)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.module = module
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if argv is None:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;argv = sys.argv
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.test = testSuite
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.verbosity = 1
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.explain = 0
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.defaultTest = defaultTest
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.testRunner = testRunner
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.testLoader = testLoader
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.progName = os.path.basename(argv[0])
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.parseArgs(argv)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.runTests()
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def usageExit(self, msg=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if msg: print(msg)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(self.USAGE % self.__dict__)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.exit(2)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def parseArgs(self, argv):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;import getopt
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;options, args = getopt.getopt(argv[1:], 'hHvqer',
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;['help','verbose','quiet','explain', 'raise'])
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for opt, value in options:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if opt in ('-h','-H','--help'):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.usageExit()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if opt in ('-q','--quiet'):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.verbosity = 0
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if opt in ('-v','--verbose'):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.verbosity = 2
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if opt in ('-e','--explain'):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.explain = True
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if len(args) == 0 and self.defaultTest is None and self.test is None:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.test = self.testLoader.loadTestsFromModule(self.module)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if len(args) &amp;gt; 0:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.testNames = args
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.testNames = (self.defaultTest,)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.createTests()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except getopt.error, msg:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.usageExit(msg)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def createTests(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self.test == None:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.test = self.testLoader.loadTestsFromNames(self.testNames,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.module)
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def runTests(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self.testRunner is None:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.testRunner = TextTestRunner(verbosity=self.verbosity,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; explain=self.explain)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result = self.testRunner.run(self.test)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._cleanupAfterRunningTests()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.exit(not result.wasSuccessful())
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;def _cleanupAfterRunningTests(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;A hook method that is called immediately prior to calling
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.exit(not result.wasSuccessful()) in self.runTests().
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pass
&lt;br&gt;-
&lt;br&gt;-main = TestProgram
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-##############################################################################
&lt;br&gt;-# Executing this module from the command line
&lt;br&gt;-##############################################################################
&lt;br&gt;-
&lt;br&gt;-if __name__ == &amp;quot;__main__&amp;quot;:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;main(module=None)
&lt;br&gt;-
&lt;br&gt;-# vim: shiftwidth=4 tabstop=4 expandtab
&lt;br&gt;diff --git a/cheetah/Tools/MondoReport.py b/cheetah/Tools/MondoReport.py
&lt;br&gt;index d0fada2..e8d34a4 100644
&lt;br&gt;--- a/cheetah/Tools/MondoReport.py
&lt;br&gt;+++ b/cheetah/Tools/MondoReport.py
&lt;br&gt;@@ -12,7 +12,7 @@ next.query.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;How about Report: .page(), .all(), .summary()? &amp;nbsp;Or PageBreaker.
&lt;br&gt;&amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;-import operator, types
&lt;br&gt;+import operator
&lt;br&gt;&amp;nbsp;try:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;from Cheetah.NameMapper import valueForKey as lookup_func
&lt;br&gt;&amp;nbsp;except ImportError:
&lt;br&gt;@@ -22,18 +22,13 @@ except ImportError:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return obj[name] # Raises KeyError.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-########## CONSTANTS ##############################
&lt;br&gt;-
&lt;br&gt;-True, False = (1==1), (1==0)
&lt;br&gt;-numericTypes = types.IntType, types.LongType, types.FloatType
&lt;br&gt;-
&lt;br&gt;&amp;nbsp;########## PUBLIC GENERIC FUNCTIONS ##############################
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;class NegativeError(ValueError):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;pass
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;def isNumeric(v):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return type(v) in numericTypes
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;return isinstance(v, (int, float))
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;def isNonNegative(v):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ret = isNumeric(v)
&lt;br&gt;diff --git a/cheetah/Utils/Misc.py b/cheetah/Utils/Misc.py
&lt;br&gt;index 6ff5bb2..81949d1 100644
&lt;br&gt;--- a/cheetah/Utils/Misc.py
&lt;br&gt;+++ b/cheetah/Utils/Misc.py
&lt;br&gt;@@ -1,20 +1,8 @@
&lt;br&gt;-# $Id: Misc.py,v 1.8 2005/11/02 22:26:08 tavis_rudd Exp $
&lt;br&gt;-&amp;quot;&amp;quot;&amp;quot;Miscellaneous functions/objects used by Cheetah but also useful standalone.
&lt;br&gt;-
&lt;br&gt;-Meta-Data
&lt;br&gt;-================================================================================
&lt;br&gt;-Author: Mike Orr &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270076&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;iron@...&lt;/a&gt;&amp;gt;
&lt;br&gt;-License: This software is released for unlimited distribution under the
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; terms of the MIT license. &amp;nbsp;See the LICENSE file.
&lt;br&gt;-Version: $Revision: 1.8 $
&lt;br&gt;-Start Date: 2001/11/07
&lt;br&gt;-Last Revision Date: $Date: 2005/11/02 22:26:08 $
&lt;br&gt;+#!/usr/bin/env python
&lt;br&gt;+&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;Miscellaneous functions/objects used by Cheetah but also useful standalone.
&lt;br&gt;&amp;nbsp;&amp;quot;&amp;quot;&amp;quot; 
&lt;br&gt;-__author__ = &amp;quot;Mike Orr &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270076&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;iron@...&lt;/a&gt;&amp;gt;&amp;quot;
&lt;br&gt;-__revision__ = &amp;quot;$Revision: 1.8 $&amp;quot;[11:-2]
&lt;br&gt;-
&lt;br&gt;&amp;nbsp;import os &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# Used in mkdirsWithPyInitFile.
&lt;br&gt;-import types &amp;nbsp; &amp;nbsp; &amp;nbsp; # Used in useOrRaise.
&lt;br&gt;&amp;nbsp;import sys &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Used in die.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;##################################################
&lt;br&gt;@@ -29,7 +17,7 @@ def useOrRaise(thing, errmsg=''):
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Called by: Cheetah.Servlet.cgiImport()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if type(thing) == types.ClassType and issubclass(thing, Exception):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;if isinstance(thing, type) and issubclass(thing, Exception):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise thing(errmsg)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return thing
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -76,6 +64,4 @@ def mkdirsWithPyInitFiles(path):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f = open(init, 'w') # Open and close to produce empty file.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f.close()
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;&amp;nbsp;# vim: shiftwidth=4 tabstop=4 expandtab
&lt;br&gt;diff --git a/cheetah/Utils/VerifyType.py b/cheetah/Utils/VerifyType.py
&lt;br&gt;deleted file mode 100644
&lt;br&gt;index 11a435d..0000000
&lt;br&gt;--- a/cheetah/Utils/VerifyType.py
&lt;br&gt;+++ /dev/null
&lt;br&gt;@@ -1,83 +0,0 @@
&lt;br&gt;-# $Id: VerifyType.py,v 1.4 2005/11/02 22:26:08 tavis_rudd Exp $
&lt;br&gt;-&amp;quot;&amp;quot;&amp;quot;Functions to verify an argument's type
&lt;br&gt;-
&lt;br&gt;-Meta-Data
&lt;br&gt;-================================================================================
&lt;br&gt;-Author: Mike Orr &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270076&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;iron@...&lt;/a&gt;&amp;gt;
&lt;br&gt;-License: This software is released for unlimited distribution under the
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; terms of the MIT license. &amp;nbsp;See the LICENSE file.
&lt;br&gt;-Version: $Revision: 1.4 $
&lt;br&gt;-Start Date: 2001/11/07
&lt;br&gt;-Last Revision Date: $Date: 2005/11/02 22:26:08 $
&lt;br&gt;-&amp;quot;&amp;quot;&amp;quot; 
&lt;br&gt;-__author__ = &amp;quot;Mike Orr &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270076&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;iron@...&lt;/a&gt;&amp;gt;&amp;quot;
&lt;br&gt;-__revision__ = &amp;quot;$Revision: 1.4 $&amp;quot;[11:-2]
&lt;br&gt;-
&lt;br&gt;-##################################################
&lt;br&gt;-## DEPENDENCIES
&lt;br&gt;-
&lt;br&gt;-import types &amp;nbsp; &amp;nbsp; &amp;nbsp; # Used in VerifyTypeClass.
&lt;br&gt;-
&lt;br&gt;-##################################################
&lt;br&gt;-## PRIVATE FUNCTIONS
&lt;br&gt;-
&lt;br&gt;-def _errmsg(argname, ltd, errmsgExtra=''):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Construct an error message.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;argname, string, the argument name.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;ltd, string, description of the legal types.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;errmsgExtra, string, text to append to error mssage.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Returns: string, the error message.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if errmsgExtra:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;errmsgExtra = '\n' + errmsgExtra
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return &amp;quot;arg '%s' must be %s%s&amp;quot; % (argname, ltd, errmsgExtra)
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-##################################################
&lt;br&gt;-## TYPE VERIFICATION FUNCTIONS
&lt;br&gt;-
&lt;br&gt;-def VerifyType(arg, argname, legalTypes, ltd, errmsgExtra=''):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Verify the type of an argument.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;arg, any, the argument.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;argname, string, name of the argument.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;legalTypes, list of type objects, the allowed types.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;ltd, string, description of legal types (for error message).
&lt;br&gt;- &amp;nbsp; &amp;nbsp;errmsgExtra, string, text to append to error message.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Returns: None.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Exceptions: TypeError if 'arg' is the wrong type.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if type(arg) not in legalTypes:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;m = _errmsg(argname, ltd, errmsgExtra)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise TypeError(m)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return True
&lt;br&gt;-
&lt;br&gt;-
&lt;br&gt;-def VerifyTypeClass(arg, argname, legalTypes, ltd, klass, errmsgExtra=''):
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Same, but if it's a class, verify it's a subclass of the right class.
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;arg, any, the argument.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;argname, string, name of the argument.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;legalTypes, list of type objects, the allowed types.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;ltd, string, description of legal types (for error message).
&lt;br&gt;- &amp;nbsp; &amp;nbsp;klass, class, the parent class.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;errmsgExtra, string, text to append to the error message.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Returns: None.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Exceptions: TypeError if 'arg' is the wrong type.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;VerifyType(arg, argname, legalTypes, ltd, errmsgExtra)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;# If no exception, the arg is a legal type.
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if type(arg) == types.ClassType and not issubclass(arg, klass):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# Must test for &amp;quot;is class type&amp;quot; to avoid TypeError from issubclass().
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;m = _errmsg(argname, ltd, errmsgExtra)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise TypeError(m)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return True
&lt;br&gt;-
&lt;br&gt;-# @@MO: Commented until we determine whether it's useful.
&lt;br&gt;-#def VerifyClass(arg, argname, klass, ltd):
&lt;br&gt;-# &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Same, but allow *only* a subclass of the right class.
&lt;br&gt;-# &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;-# &amp;nbsp; &amp;nbsp;VerifyTypeClass(arg, argname, [types.ClassType], ltd, klass)
&lt;br&gt;-
&lt;br&gt;-# vim: shiftwidth=4 tabstop=4 expandtab
&lt;br&gt;diff --git a/cheetah/Utils/memcache.py b/cheetah/Utils/memcache.py
&lt;br&gt;index 029f621..c535303 100644
&lt;br&gt;--- a/cheetah/Utils/memcache.py
&lt;br&gt;+++ b/cheetah/Utils/memcache.py
&lt;br&gt;@@ -45,7 +45,6 @@ More detailed documentation is available in the L{Client} class.
&lt;br&gt;&amp;nbsp;import sys
&lt;br&gt;&amp;nbsp;import socket
&lt;br&gt;&amp;nbsp;import time
&lt;br&gt;-import types
&lt;br&gt;&amp;nbsp;try:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;import cPickle as pickle
&lt;br&gt;&amp;nbsp;except ImportError:
&lt;br&gt;@@ -168,7 +167,7 @@ class Client:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.buckets.append(server)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def _get_server(self, key):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if type(key) == types.TupleType:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(key, tuple):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;serverhash = key[0]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;key = key[1]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;@@ -301,7 +300,7 @@ class Client:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._statlog(cmd)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flags = 0
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(val, types.StringTypes):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(val, str):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pass
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif isinstance(val, int):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flags |= Client._FLAG_INTEGER
&lt;br&gt;@@ -343,7 +342,7 @@ class Client:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;value = self._recv_value(server, flags, rlen)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;server.expect(&amp;quot;END&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except (_Error, socket.error), msg:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if type(msg) is types.TupleType:
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(msg, tuple):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg = msg[1]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;server.mark_dead(msg)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return None
&lt;br&gt;@@ -451,7 +450,7 @@ class _Host:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;_DEAD_RETRY = 30 &amp;nbsp;# number of seconds before retrying a dead server.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def __init__(self, host, debugfunc=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(host, types.TupleType):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if isinstance(host, tuple):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;host = host[0]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.weight = host[1]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;@@ -562,7 +561,7 @@ if __name__ == &amp;quot;__main__&amp;quot;:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;mc = Client(servers, debug=1)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def to_s(val):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not isinstance(val, types.StringTypes):
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not isinstance(val, str):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;%s (%s)&amp;quot; % (val, type(val))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;%s&amp;quot; % val
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def test_setget(key, val):
&lt;br&gt;diff --git a/cheetah/c/_verifytype.c b/cheetah/c/_verifytype.c
&lt;br&gt;deleted file mode 100644
&lt;br&gt;index 6dadf22..0000000
&lt;br&gt;--- a/cheetah/c/_verifytype.c
&lt;br&gt;+++ /dev/null
&lt;br&gt;@@ -1,107 +0,0 @@
&lt;br&gt;-/*
&lt;br&gt;- * C-version of the src/Utils/VerifyType.py module.
&lt;br&gt;- *
&lt;br&gt;- * (c) 2009, R. Tyler Ballance &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270076&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt;
&lt;br&gt;- */
&lt;br&gt;-#include &amp;lt;Python.h&amp;gt;
&lt;br&gt;-#if __STDC_VERSION__ &amp;gt;= 199901L
&lt;br&gt;-#include &amp;lt;stdbool.h&amp;gt;
&lt;br&gt;-#else
&lt;br&gt;-typedef enum { false, true } bool;
&lt;br&gt;-#endif
&lt;br&gt;-
&lt;br&gt;-#include &amp;quot;Cheetah.h&amp;quot;
&lt;br&gt;-
&lt;br&gt;-#ifdef __cplusplus
&lt;br&gt;-extern &amp;quot;C&amp;quot; {
&lt;br&gt;-#endif
&lt;br&gt;-
&lt;br&gt;-static PyObject *_errorMessage(char *arg, char *legalTypes, char *extra)
&lt;br&gt;-{
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return PyString_FromFormat(&amp;quot;Argument '%s' must be %s\n&amp;quot;, arg, legalTypes);
&lt;br&gt;-}
&lt;br&gt;-
&lt;br&gt;-static PyObject *py_verifytype(PyObject *self, PyObject *args, PyObject *kwargs)
&lt;br&gt;-{
&lt;br&gt;- &amp;nbsp; &amp;nbsp;PyObject *argument, *legalTypes;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;char *arg_string, *types_string, *extra;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;PyObject *iterator, *item;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;bool rc = false;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;char *kwlist[] = {&amp;quot;argument&amp;quot;, &amp;quot;argument_name&amp;quot;, &amp;quot;legalType&amp;quot;,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;types_string&amp;quot;, &amp;quot;errmsgExtra&amp;quot;, NULL};
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if (!PyArg_ParseTupleAndKeywords(args, kwargs, &amp;quot;OsOs|s&amp;quot;, kwlist, &amp;argument, 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;arg_string, &amp;legalTypes, &amp;types_string, &amp;extra))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return NULL;
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;iterator = PyObject_GetIter(legalTypes);
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if (iterator == NULL) {
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return NULL;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;}
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;while (item = PyIter_Next(iterator)) {
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((PyObject *)argument-&amp;gt;ob_type == item) {
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rc = true;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Py_DECREF(item);
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Py_DECREF(item);
&lt;br&gt;- &amp;nbsp; &amp;nbsp;}
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Py_DECREF(iterator);
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if (rc)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Py_RETURN_TRUE;
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;PyErr_SetObject(PyExc_TypeError, _errorMessage(arg_string,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;types_string, extra));
&lt;br&gt;- &amp;nbsp; &amp;nbsp;return NULL;
&lt;br&gt;-}
&lt;br&gt;-
&lt;br&gt;-static PyObject *py_verifytypeclass(PyObject *self, PyObject *args, PyObject *kwargs) 
&lt;br&gt;-{
&lt;br&gt;- &amp;nbsp; &amp;nbsp;PyObject *argument, *legalTypes, *klass;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;PyObject *verifyTypeArgs, *v;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;char *arg_string, *types_string, *extra;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;bool rc = false;
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;char *kwlist[] = {&amp;quot;argument&amp;quot;, &amp;quot;argument_name&amp;quot;, &amp;quot;legalTypes&amp;quot;, 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;types_string&amp;quot;, &amp;quot;klass&amp;quot;, &amp;quot;errmsgExtra&amp;quot;, NULL};
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if (!PyArg_ParseTupleAndKeywords(args, kwargs, &amp;quot;OsOsO|s&amp;quot;, kwlist, &amp;argument,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;arg_string, &amp;legalTypes, &amp;types_string, &amp;klass, &amp;extra))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return NULL;
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;verifyTypeArgs = Py_BuildValue(&amp;quot;OsOs&amp;quot;, argument, arg_string, legalTypes, 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;types_string);
&lt;br&gt;- &amp;nbsp; &amp;nbsp;v = py_verifytype(self, verifyTypeArgs, NULL);
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if (v == NULL)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return NULL;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Py_DECREF(v);
&lt;br&gt;-
&lt;br&gt;- &amp;nbsp; &amp;nbsp;if (PyClass_Check(argument) &amp;&amp; (!PyClass_IsSubclass(argument, klass)) ) {
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PyErr_SetObject(PyExc_TypeError, _errorMessage(arg_string,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;types_string, extra));
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return NULL;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;}
&lt;br&gt;- &amp;nbsp; &amp;nbsp;Py_RETURN_TRUE;
&lt;br&gt;-}
&lt;br&gt;-
&lt;br&gt;-static const char _verifytypedoc[] = &amp;quot;\
&lt;br&gt;-\n\
&lt;br&gt;-&amp;quot;;
&lt;br&gt;-static struct PyMethodDef _verifytype_methods[] = {
&lt;br&gt;- &amp;nbsp; &amp;nbsp;{&amp;quot;verifyType&amp;quot;, (PyCFunction)py_verifytype, METH_VARARGS | METH_KEYWORDS, NULL},
&lt;br&gt;- &amp;nbsp; &amp;nbsp;{&amp;quot;verifyTypeClass&amp;quot;, (PyCFunction)py_verifytypeclass, METH_VARARGS | METH_KEYWORDS, NULL},
&lt;br&gt;- &amp;nbsp; &amp;nbsp;{NULL}
&lt;br&gt;-};
&lt;br&gt;-
&lt;br&gt;-PyMODINIT_FUNC init_verifytype()
&lt;br&gt;-{
&lt;br&gt;- &amp;nbsp; &amp;nbsp;PyObject *module = Py_InitModule3(&amp;quot;_verifytype&amp;quot;, _verifytype_methods,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_verifytypedoc);
&lt;br&gt;-}
&lt;br&gt;-
&lt;br&gt;-#ifdef __cplusplus
&lt;br&gt;-}
&lt;br&gt;-#endif
&lt;br&gt;-- 
&lt;br&gt;1.6.4.2
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270076&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-0-3--Preliminary-refactoring-for-Python-3.xx-compat-tp26270075p26270076.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26270085</id>
	<title>[PATCH 1/3] Refactor raw print statements in accordance with 2to3</title>
	<published>2009-11-09T09:13:16Z</published>
	<updated>2009-11-09T09:13:16Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">Removed prints in a couple places entirely, some of this
&lt;br&gt;code should likely use the `logging` module instead
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;SetupConfig.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;SetupTools.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 12 +++++-----
&lt;br&gt;&amp;nbsp;cheetah/CheetahWrapper.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;8 +++---
&lt;br&gt;&amp;nbsp;cheetah/Filters.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 24 ++++++++++----------
&lt;br&gt;&amp;nbsp;cheetah/ImportManager.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;4 +-
&lt;br&gt;&amp;nbsp;cheetah/NameMapper.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 14 ++++++------
&lt;br&gt;&amp;nbsp;cheetah/Parser.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 15 ++++--------
&lt;br&gt;&amp;nbsp;cheetah/Template.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/TemplateCmdLineIface.py &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;8 +++---
&lt;br&gt;&amp;nbsp;cheetah/Templates/_SkeletonPage.py &amp;nbsp; | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/CheetahWrapper.py &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;4 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Filters.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Performance.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;8 +++---
&lt;br&gt;&amp;nbsp;cheetah/Tests/Regressions.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/SyntaxAndOutput.py &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Template.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;4 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/unittest_local_copy.py | &amp;nbsp; &amp;nbsp;4 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/xmlrunner.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;4 +-
&lt;br&gt;&amp;nbsp;cheetah/Tools/SiteHierarchy.py &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 10 ++++----
&lt;br&gt;&amp;nbsp;cheetah/Utils/memcache.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 39 +++++++++++++++------------------
&lt;br&gt;&amp;nbsp;cheetah/Utils/statprof.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 16 +++++++-------
&lt;br&gt;&amp;nbsp;cheetah/Version.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 10 ++++----
&lt;br&gt;&amp;nbsp;22 files changed, 94 insertions(+), 102 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/SetupConfig.py b/SetupConfig.py
&lt;br&gt;index c95001d..85539e9 100644
&lt;br&gt;--- a/SetupConfig.py
&lt;br&gt;+++ b/SetupConfig.py
&lt;br&gt;@@ -71,7 +71,7 @@ if not os.getenv('CHEETAH_INSTALL_WITHOUT_SETUPTOOLS'):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;except ImportError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print 'Not using setuptools, so we cannot install the Markdown dependency'
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('Not using setuptools, so we cannot install the Markdown dependency')
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;description = &amp;quot;Cheetah is a template engine and code generation tool.&amp;quot;
&lt;br&gt;diff --git a/SetupTools.py b/SetupTools.py
&lt;br&gt;index d08eef2..096ee40 100644
&lt;br&gt;--- a/SetupTools.py
&lt;br&gt;+++ b/SetupTools.py
&lt;br&gt;@@ -158,14 +158,14 @@ def run_setup(configurations):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;apply(setup, (), kws)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;except BuildFailed, x:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;One or more C extensions failed to build.&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;Details: %s&amp;quot; % x
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;Retrying without C extensions enabled.&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;One or more C extensions failed to build.&amp;quot;)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;Details: %s&amp;quot; % x)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;Retrying without C extensions enabled.&amp;quot;)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;del kws['ext_modules']
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;apply(setup, (), kws)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;One or more C extensions failed to build.&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;Performance enhancements will not be available.&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;Pure Python installation succeeded.&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;One or more C extensions failed to build.&amp;quot;)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;Performance enhancements will not be available.&amp;quot;)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;Pure Python installation succeeded.&amp;quot;)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;diff --git a/cheetah/CheetahWrapper.py b/cheetah/CheetahWrapper.py
&lt;br&gt;index 3b1f991..d01f46a 100644
&lt;br&gt;--- a/cheetah/CheetahWrapper.py
&lt;br&gt;+++ b/cheetah/CheetahWrapper.py
&lt;br&gt;@@ -195,14 +195,14 @@ Files are %s&amp;quot;&amp;quot;&amp;quot;, args, pprint.pformat(vars(opts)), files)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if opts.print_settings:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print 
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print '&amp;gt;&amp;gt; Available Cheetah compiler settings:'
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print() 
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('&amp;gt;&amp;gt; Available Cheetah compiler settings:')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from Cheetah.Compiler import _DEFAULT_COMPILER_SETTINGS
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;listing = _DEFAULT_COMPILER_SETTINGS
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;listing.sort(key=lambda l: l[0][0].lower())
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for l in listing:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print '\t%s (default: &amp;quot;%s&amp;quot;)\t%s' % l
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('\t%s (default: &amp;quot;%s&amp;quot;)\t%s' % l)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.exit(0)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#cleanup trailing path separators
&lt;br&gt;@@ -266,7 +266,7 @@ you do have write permission to and re-run the tests.&amp;quot;&amp;quot;&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;runner.run(unittest.TestSuite(Test.suites))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def version(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print Version
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(Version)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;# If you add a command, also add it to the 'meths' variable in main().
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;diff --git a/cheetah/Filters.py b/cheetah/Filters.py
&lt;br&gt;index d452439..39ac9ec 100644
&lt;br&gt;--- a/cheetah/Filters.py
&lt;br&gt;+++ b/cheetah/Filters.py
&lt;br&gt;@@ -65,9 +65,9 @@ class Markdown(EncodeUnicode):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;import markdown
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except ImportError:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print '&amp;gt;&amp;gt;&amp;gt; Exception raised importing the &amp;quot;markdown&amp;quot; module'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print '&amp;gt;&amp;gt;&amp;gt; Are you sure you have the ElementTree module installed?'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print ' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://effbot.org/downloads/#elementtree'&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://effbot.org/downloads/#elementtree'&lt;/a&gt;&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('&amp;gt;&amp;gt;&amp;gt; Exception raised importing the &amp;quot;markdown&amp;quot; module')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('&amp;gt;&amp;gt;&amp;gt; Are you sure you have the ElementTree module installed?')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(' &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://effbot.org/downloads/#elementtree'&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://effbot.org/downloads/#elementtree'&lt;/a&gt;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;encoded = super(Markdown, self).filter(value, **kwargs)
&lt;br&gt;@@ -97,8 +97,8 @@ class CodeHighlighter(EncodeUnicode):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from pygments import lexers
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from pygments import formatters
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except ImportError, ex:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print '&amp;lt;%s&amp;gt; - Failed to import pygments! (%s)' % (self.__class__.__name__, ex)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print '-- You may need to install it from: &lt;a href=&quot;http://pygments.org'&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pygments.org'&lt;/a&gt;&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('&amp;lt;%s&amp;gt; - Failed to import pygments! (%s)' % (self.__class__.__name__, ex))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('-- You may need to install it from: &lt;a href=&quot;http://pygments.org'&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pygments.org'&lt;/a&gt;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return encoded
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lexer = None
&lt;br&gt;@@ -196,15 +196,15 @@ class StripSqueeze(Filter):
&lt;br&gt;&amp;nbsp;def test():
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;s1 = &amp;quot;abc &amp;lt;=&amp;gt; &amp;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;s2 = &amp;quot; &amp;nbsp; asdf &amp;nbsp;\n\t &amp;nbsp;1 &amp;nbsp;2 &amp;nbsp; &amp;nbsp;3\n&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot;WebSafe INPUT:&amp;quot;, `s1`
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot; &amp;nbsp; &amp;nbsp; &amp;nbsp;WebSafe:&amp;quot;, `WebSafe().filter(s1)`
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot;WebSafe INPUT:&amp;quot;, `s1`)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot; &amp;nbsp; &amp;nbsp; &amp;nbsp;WebSafe:&amp;quot;, `WebSafe().filter(s1)`)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot; Strip INPUT:&amp;quot;, `s2`
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; Strip:&amp;quot;, `Strip().filter(s2)`
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot;StripSqueeze:&amp;quot;, `StripSqueeze().filter(s2)`
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot; Strip INPUT:&amp;quot;, `s2`)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; Strip:&amp;quot;, `Strip().filter(s2)`)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot;StripSqueeze:&amp;quot;, `StripSqueeze().filter(s2)`)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot;Unicode:&amp;quot;, `EncodeUnicode().filter(u'aoeu12345\u1234')`
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot;Unicode:&amp;quot;, `EncodeUnicode().filter(u'aoeu12345\u1234')`)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp;if __name__ == &amp;quot;__main__&amp;quot;: &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;test()
&lt;br&gt;diff --git a/cheetah/ImportManager.py b/cheetah/ImportManager.py
&lt;br&gt;index 743360e..667898f 100755
&lt;br&gt;--- a/cheetah/ImportManager.py
&lt;br&gt;+++ b/cheetah/ImportManager.py
&lt;br&gt;@@ -223,8 +223,8 @@ class DirOwner(Owner):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;co = compile(open(py[0], 'r').read()+'\n', py[0], 'exec')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except SyntaxError, e:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;Invalid syntax in %s&amp;quot; % py[0]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print e.args
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;Invalid syntax in %s&amp;quot; % py[0])
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(e.args)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;elif pyc:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;stuff = open(pyc[0], 'rb').read()
&lt;br&gt;diff --git a/cheetah/NameMapper.py b/cheetah/NameMapper.py
&lt;br&gt;index 3a6322e..c70db38 100644
&lt;br&gt;--- a/cheetah/NameMapper.py
&lt;br&gt;+++ b/cheetah/NameMapper.py
&lt;br&gt;@@ -364,13 +364,13 @@ def example():
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;b = 'this is local b'
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print valueForKey(a.dic,'subDict')
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print valueForName(a, 'dic.item')
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print valueForName(vars(), 'b')
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print valueForName(__builtins__, 'dir')()
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print valueForName(vars(), 'a.classVar')
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print valueForName(vars(), 'a.dic.func', executeCallables=True)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print valueForName(vars(), 'a.method2.item1', executeCallables=True)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(valueForKey(a.dic,'subDict'))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(valueForName(a, 'dic.item'))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(valueForName(vars(), 'b'))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(valueForName(__builtins__, 'dir')())
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(valueForName(vars(), 'a.classVar'))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(valueForName(vars(), 'a.dic.func', executeCallables=True))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(valueForName(vars(), 'a.method2.item1', executeCallables=True))
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;if __name__ == '__main__':
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;example()
&lt;br&gt;diff --git a/cheetah/Parser.py b/cheetah/Parser.py
&lt;br&gt;index 7436e9c..4a8515d 100644
&lt;br&gt;--- a/cheetah/Parser.py
&lt;br&gt;+++ b/cheetah/Parser.py
&lt;br&gt;@@ -1224,7 +1224,6 @@ class _LowLevelParser(SourceReader):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;startPosIdx = 3
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;startPosIdx = 1
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#print 'CHEETAH STRING', nextToken, theStr, startPosIdx
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.setPos(beforeTokenPos+startPosIdx+1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;outputExprs = []
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strConst = ''
&lt;br&gt;@@ -1240,8 +1239,6 @@ class _LowLevelParser(SourceReader):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.setPos(endPos)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if strConst:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;outputExprs.append(repr(strConst))
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#if not self.atEnd() and self.matches('.join('):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# &amp;nbsp; &amp;nbsp;print 'DEBUG***'
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;token = &amp;quot;''.join([&amp;quot;+','.join(outputExprs)+&amp;quot;])&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return token
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -1854,13 +1851,11 @@ class _HighLevelParser(_LowLevelParser):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._compiler.setCompilerSetting(settingName, valueExpr)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;out = sys.stderr
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;gt;&amp;gt; out, 'An error occurred while processing the following #compiler directive.'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;gt;&amp;gt; out, '-'*80
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;gt;&amp;gt; out, self[startPos:endPos]
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;gt;&amp;gt; out, '-'*80
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;gt;&amp;gt; out, 'Please check the syntax of these settings.'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;gt;&amp;gt; out, 'A full Python exception traceback follows.'
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.stderr.write('An error occurred while processing the following #compiler directive.\n')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.stderr.write('----------------------------------------------------------------------\n')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.stderr.write('%s\n' % self[startPos:endPos])
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.stderr.write('----------------------------------------------------------------------\n')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.stderr.write('Please check the syntax of these settings.\n\n')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;diff --git a/cheetah/Template.py b/cheetah/Template.py
&lt;br&gt;index ec92208..ab63074 100644
&lt;br&gt;--- a/cheetah/Template.py
&lt;br&gt;+++ b/cheetah/Template.py
&lt;br&gt;@@ -1837,7 +1837,7 @@ class Template(Servlet):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# 'dic = super(ThisClass, self).webInput(names, namesMulti, ...)'
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# and then the code below.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if debug:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &amp;quot;&amp;lt;PRE&amp;gt;\n&amp;quot; + pprint.pformat(dic) + &amp;quot;\n&amp;lt;/PRE&amp;gt;\n\n&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&amp;quot;&amp;lt;PRE&amp;gt;\n&amp;quot; + pprint.pformat(dic) + &amp;quot;\n&amp;lt;/PRE&amp;gt;\n\n&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.searchList().insert(0, dic)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return dic
&lt;br&gt;&amp;nbsp;
&lt;br&gt;diff --git a/cheetah/TemplateCmdLineIface.py b/cheetah/TemplateCmdLineIface.py
&lt;br&gt;index 16a90cf..6690b6d 100644
&lt;br&gt;--- a/cheetah/TemplateCmdLineIface.py
&lt;br&gt;+++ b/cheetah/TemplateCmdLineIface.py
&lt;br&gt;@@ -41,7 +41,7 @@ class CmdLineIface:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;The main program controller.&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._processCmdLineArgs()
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print self._template
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(self._template)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def _processCmdLineArgs(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;@@ -53,13 +53,13 @@ class CmdLineIface:
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except getopt.GetoptError, v:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# print help information and exit:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print v
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print self.usage()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(v)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(self.usage())
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.exit(2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for o, a in self._opts:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if o in ('-h','--help'):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print self.usage()
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(self.usage())
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.exit()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if o == '--env':
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._template.searchList().insert(0, os.environ)
&lt;br&gt;diff --git a/cheetah/Templates/_SkeletonPage.py b/cheetah/Templates/_SkeletonPage.py
&lt;br&gt;index fe01ebf..95a59a7 100644
&lt;br&gt;--- a/cheetah/Templates/_SkeletonPage.py
&lt;br&gt;+++ b/cheetah/Templates/_SkeletonPage.py
&lt;br&gt;@@ -88,7 +88,7 @@ class _SkeletonPage(Template):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if not self._stylesheets.has_key(identifier):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;warning = '# the identifier ' + identifier + \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'was in stylesheetsOrder, but not in stylesheets'
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print warning
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(warning)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;stylesheetTagsTxt += warning
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;continue
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;diff --git a/cheetah/Tests/CheetahWrapper.py b/cheetah/Tests/CheetahWrapper.py
&lt;br&gt;index e152e68..809be40 100644
&lt;br&gt;--- a/cheetah/Tests/CheetahWrapper.py
&lt;br&gt;+++ b/cheetah/Tests/CheetahWrapper.py
&lt;br&gt;@@ -52,7 +52,7 @@ class CFBase(unittest.TestCase):
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def inform(self, message):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self.verbose:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print message
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(message)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def setUp(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;Create the top-level directories, subdirectories and .tmpl
&lt;br&gt;@@ -520,7 +520,7 @@ def listTests(cheetahWrapperFile):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;m = rx.search(lin)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if m:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print m.group(1)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(m.group(1))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;f.close()
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;def main():
&lt;br&gt;diff --git a/cheetah/Tests/Filters.py b/cheetah/Tests/Filters.py
&lt;br&gt;index bf35440..9b3c7c2 100644
&lt;br&gt;--- a/cheetah/Tests/Filters.py
&lt;br&gt;+++ b/cheetah/Tests/Filters.py
&lt;br&gt;@@ -31,7 +31,7 @@ Header
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assert template == expected
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except Exception, ex:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ex.__class__.__name__ == 'MarkdownException' and majorVer == 2 and minorVer &amp;lt; 5:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print '&amp;gt;&amp;gt;&amp;gt; NOTE: Support for the Markdown filter will be broken for you. Markdown says: %s' % ex
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('&amp;gt;&amp;gt;&amp;gt; NOTE: Support for the Markdown filter will be broken for you. Markdown says: %s' % ex)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise
&lt;br&gt;&amp;nbsp;
&lt;br&gt;diff --git a/cheetah/Tests/Performance.py b/cheetah/Tests/Performance.py
&lt;br&gt;index 8101e85..fc74367 100644
&lt;br&gt;--- a/cheetah/Tests/Performance.py
&lt;br&gt;+++ b/cheetah/Tests/Performance.py
&lt;br&gt;@@ -57,8 +57,8 @@ def perftest(max_num_pystones, current_pystone=None):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pystone_total_time = total_time / pystone_rate
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;global DEBUG
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if DEBUG:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print 'The test &amp;quot;%s&amp;quot; took: %s pystones' % (function.func_name,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pystone_total_time)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('The test &amp;quot;%s&amp;quot; took: %s pystones' % (function.func_name,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pystone_total_time))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if pystone_total_time &amp;gt; (max_num_pystones + TOLERANCE):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;raise DurationError((('Test too long (%.2f Ps, '
&lt;br&gt;@@ -98,8 +98,8 @@ class PerformanceTest(unittest.TestCase):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.prof.stop()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.prof.close()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self.display:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print '&amp;gt;&amp;gt;&amp;gt; %s (%d iterations) ' % (self.__class__.__name__,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.iterations)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('&amp;gt;&amp;gt;&amp;gt; %s (%d iterations) ' % (self.__class__.__name__,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.iterations))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;stats = hotshot.stats.load('%s.prof' % self.__class__.__name__)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#stats.strip_dirs()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;stats.sort_stats('time', 'calls')
&lt;br&gt;diff --git a/cheetah/Tests/Regressions.py b/cheetah/Tests/Regressions.py
&lt;br&gt;index 4d50348..67a736a 100644
&lt;br&gt;--- a/cheetah/Tests/Regressions.py
&lt;br&gt;+++ b/cheetah/Tests/Regressions.py
&lt;br&gt;@@ -29,7 +29,7 @@ class GetAttrTest(unittest.TestCase):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def test_ValidException(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;o = CustomGetAttrClass()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print o.attr
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(o.attr)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;except GetAttrException, e:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# expected
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;diff --git a/cheetah/Tests/SyntaxAndOutput.py b/cheetah/Tests/SyntaxAndOutput.py
&lt;br&gt;index 72721bc..6bd6963 100644
&lt;br&gt;--- a/cheetah/Tests/SyntaxAndOutput.py
&lt;br&gt;+++ b/cheetah/Tests/SyntaxAndOutput.py
&lt;br&gt;@@ -171,7 +171,7 @@ Template output mismatch:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;moduleCode = templateObj._CHEETAH_generatedModuleCode
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if self.DEBUGLEV &amp;gt;= 1:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print moduleCode
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(moduleCode)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;output = templateObj.respond() # rather than __str__, because of unicode
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;assert output==expectedOutput, self._outputMismatchReport(output, expectedOutput)
&lt;br&gt;diff --git a/cheetah/Tests/Template.py b/cheetah/Tests/Template.py
&lt;br&gt;index 144ae6f..7edbdb9 100644
&lt;br&gt;--- a/cheetah/Tests/Template.py
&lt;br&gt;+++ b/cheetah/Tests/Template.py
&lt;br&gt;@@ -293,7 +293,7 @@ class TryExceptImportTest(TemplateTest):
&lt;br&gt;&amp;nbsp;class ClassMethodSupport(TemplateTest):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def test_BasicDecorator(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if sys.version_info[0] == 2 and sys.version_info[1] == 3:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print 'This version of Python doesn\'t support decorators, skipping tests'
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('This version of Python doesn\'t support decorators, skipping tests')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template = '''
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#@classmethod
&lt;br&gt;@@ -311,7 +311,7 @@ class ClassMethodSupport(TemplateTest):
&lt;br&gt;&amp;nbsp;class StaticMethodSupport(TemplateTest):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def test_BasicDecorator(self):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if sys.version_info[0] == 2 and sys.version_info[1] == 3:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print 'This version of Python doesn\'t support decorators, skipping tests'
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('This version of Python doesn\'t support decorators, skipping tests')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;template = '''
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#@staticmethod
&lt;br&gt;diff --git a/cheetah/Tests/unittest_local_copy.py b/cheetah/Tests/unittest_local_copy.py
&lt;br&gt;index a5f5499..11d2d2c 100755
&lt;br&gt;--- a/cheetah/Tests/unittest_local_copy.py
&lt;br&gt;+++ b/cheetah/Tests/unittest_local_copy.py
&lt;br&gt;@@ -917,8 +917,8 @@ Examples:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.runTests()
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def usageExit(self, msg=None):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if msg: print msg
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print self.USAGE % self.__dict__
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if msg: print(msg)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(self.USAGE % self.__dict__)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.exit(2)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def parseArgs(self, argv):
&lt;br&gt;diff --git a/cheetah/Tests/xmlrunner.py b/cheetah/Tests/xmlrunner.py
&lt;br&gt;index dc49c56..bc9f6ab 100644
&lt;br&gt;--- a/cheetah/Tests/xmlrunner.py
&lt;br&gt;+++ b/cheetah/Tests/xmlrunner.py
&lt;br&gt;@@ -313,7 +313,7 @@ class XMLTestRunnerTest(unittest.TestCase):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;class TestTest(unittest.TestCase):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def test_foo(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;Test&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;Test&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._try_test_run(TestTest, &amp;quot;&amp;quot;&amp;quot;&amp;lt;testsuite errors=&amp;quot;0&amp;quot; failures=&amp;quot;0&amp;quot; name=&amp;quot;unittest.TestSuite&amp;quot; tests=&amp;quot;1&amp;quot; time=&amp;quot;0.000&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;testcase classname=&amp;quot;__main__.TestTest&amp;quot; name=&amp;quot;test_foo&amp;quot; time=&amp;quot;0.000&amp;quot;&amp;gt;&amp;lt;/testcase&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;system-out&amp;gt;&amp;lt;![CDATA[Test
&lt;br&gt;@@ -329,7 +329,7 @@ class XMLTestRunnerTest(unittest.TestCase):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;class TestTest(unittest.TestCase):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;def test_foo(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;gt;&amp;gt;sys.stderr, &amp;quot;Test&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;Test&amp;quot;, file=sys.stderr)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self._try_test_run(TestTest, &amp;quot;&amp;quot;&amp;quot;&amp;lt;testsuite errors=&amp;quot;0&amp;quot; failures=&amp;quot;0&amp;quot; name=&amp;quot;unittest.TestSuite&amp;quot; tests=&amp;quot;1&amp;quot; time=&amp;quot;0.000&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;testcase classname=&amp;quot;__main__.TestTest&amp;quot; name=&amp;quot;test_foo&amp;quot; time=&amp;quot;0.000&amp;quot;&amp;gt;&amp;lt;/testcase&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;lt;system-out&amp;gt;&amp;lt;![CDATA[]]&amp;gt;&amp;lt;/system-out&amp;gt;
&lt;br&gt;diff --git a/cheetah/Tools/SiteHierarchy.py b/cheetah/Tools/SiteHierarchy.py
&lt;br&gt;index 06da56f..6cae0bc 100644
&lt;br&gt;--- a/cheetah/Tools/SiteHierarchy.py
&lt;br&gt;+++ b/cheetah/Tools/SiteHierarchy.py
&lt;br&gt;@@ -173,10 +173,10 @@ if __name__ == '__main__':
&lt;br&gt;&amp;nbsp;		 &amp;nbsp; &amp;nbsp;]
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	for url in ['/', '/services', '/services/products/widget', '/contact']:
&lt;br&gt;-		print '&amp;lt;p&amp;gt;', '='*50
&lt;br&gt;-		print '&amp;lt;br&amp;gt; %s: &amp;lt;br&amp;gt;\n' % url
&lt;br&gt;+		print('&amp;lt;p&amp;gt;', '='*50)
&lt;br&gt;+		print('&amp;lt;br&amp;gt; %s: &amp;lt;br&amp;gt;\n' % url)
&lt;br&gt;&amp;nbsp;		n = Hierarchy(hierarchy, url, menuCSSClass='menu', crumbCSSClass='crumb',
&lt;br&gt;&amp;nbsp;			 &amp;nbsp; &amp;nbsp; &amp;nbsp;prefix='/here')
&lt;br&gt;-		print n.menuList()
&lt;br&gt;-		print '&amp;lt;p&amp;gt;', '-'*50
&lt;br&gt;-		print n.crumbs()
&lt;br&gt;+		print(n.menuList())
&lt;br&gt;+		print('&amp;lt;p&amp;gt;', '-'*50)
&lt;br&gt;+		print(n.crumbs())
&lt;br&gt;diff --git a/cheetah/Utils/memcache.py b/cheetah/Utils/memcache.py
&lt;br&gt;index ee9678d..029f621 100644
&lt;br&gt;--- a/cheetah/Utils/memcache.py
&lt;br&gt;+++ b/cheetah/Utils/memcache.py
&lt;br&gt;@@ -177,7 +177,6 @@ class Client:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for i in range(Client._SERVER_RETRIES):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;server = self.buckets[serverhash % len(self.buckets)]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if server.connect():
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#print &amp;quot;(using server %s)&amp;quot; % server,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return server, key
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;serverhash = hash(str(serverhash) + str(i))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return None, None
&lt;br&gt;@@ -555,10 +554,9 @@ def _doctest():
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return doctest.testmod(memcache, globs=globs)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;if __name__ == &amp;quot;__main__&amp;quot;:
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot;Testing docstrings...&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot;Testing docstrings...&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;_doctest()
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot;Running tests:&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot;Running tests:&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;#servers = [&amp;quot;127.0.0.1:11211&amp;quot;, &amp;quot;127.0.0.1:11212&amp;quot;]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;servers = [&amp;quot;127.0.0.1:11211&amp;quot;]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;mc = Client(servers, debug=1)
&lt;br&gt;@@ -568,14 +566,14 @@ if __name__ == &amp;quot;__main__&amp;quot;:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;%s (%s)&amp;quot; % (val, type(val))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &amp;quot;%s&amp;quot; % val
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def test_setget(key, val):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;Testing set/get {'%s': %s} ...&amp;quot; % (to_s(key), to_s(val)),
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;Testing set/get {'%s': %s} ...&amp;quot; % (to_s(key), to_s(val)))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mc.set(key, val)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;newval = mc.get(key)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if newval == val:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;OK&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;OK&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;FAIL&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;FAIL&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 0
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;class FooStruct:
&lt;br&gt;@@ -591,34 +589,33 @@ if __name__ == &amp;quot;__main__&amp;quot;:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;test_setget(&amp;quot;a_string&amp;quot;, &amp;quot;some random string&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;test_setget(&amp;quot;an_integer&amp;quot;, 42)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if test_setget(&amp;quot;long&amp;quot;, long(1&amp;lt;&amp;lt;30)):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;Testing delete ...&amp;quot;,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;Testing delete ...&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if mc.delete(&amp;quot;long&amp;quot;):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;OK&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;OK&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;FAIL&amp;quot;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot;Testing get_multi ...&amp;quot;,
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print mc.get_multi([&amp;quot;a_string&amp;quot;, &amp;quot;an_integer&amp;quot;])
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;FAIL&amp;quot;)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot;Testing get_multi ...&amp;quot;)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(mc.get_multi([&amp;quot;a_string&amp;quot;, &amp;quot;an_integer&amp;quot;]))
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot;Testing get(unknown value) ...&amp;quot;,
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print to_s(mc.get(&amp;quot;unknown_value&amp;quot;))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot;Testing get(unknown value) ...&amp;quot;)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(to_s(mc.get(&amp;quot;unknown_value&amp;quot;)))
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;f = FooStruct()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;test_setget(&amp;quot;foostruct&amp;quot;, f)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot;Testing incr ...&amp;quot;,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot;Testing incr ...&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;x = mc.incr(&amp;quot;an_integer&amp;quot;, 1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if x == 43:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;OK&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;OK&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;FAIL&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;FAIL&amp;quot;)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print &amp;quot;Testing decr ...&amp;quot;,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(&amp;quot;Testing decr ...&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;x = mc.decr(&amp;quot;an_integer&amp;quot;, 1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if x == 42:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;OK&amp;quot;
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;OK&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;else:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print &amp;quot;FAIL&amp;quot;
&lt;br&gt;-
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print(&amp;quot;FAIL&amp;quot;)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;# vim: ts=4 sw=4 et :
&lt;br&gt;diff --git a/cheetah/Utils/statprof.py b/cheetah/Utils/statprof.py
&lt;br&gt;index 55638eb..d6d64d6 100644
&lt;br&gt;--- a/cheetah/Utils/statprof.py
&lt;br&gt;+++ b/cheetah/Utils/statprof.py
&lt;br&gt;@@ -277,15 +277,15 @@ class CallStats(object):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;self.cum_secs_per_call = None
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;def display(self):
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print '%6.2f %9.2f %9.2f &amp;nbsp;%s' % (self.pcnt_time_in_proc,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('%6.2f %9.2f %9.2f &amp;nbsp;%s' % (self.pcnt_time_in_proc,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.cum_secs_in_proc,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.self_secs_in_proc,
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.name)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.name))
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;def display():
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if state.sample_count == 0:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print 'No samples recorded.'
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print('No samples recorded.')
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;l = [CallStats(x) for x in call_data.itervalues()]
&lt;br&gt;@@ -293,12 +293,12 @@ def display():
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;l.sort(reverse=True)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;l = [x[2] for x in l]
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print '%5.5s %10.10s &amp;nbsp; %7.7s &amp;nbsp;%-8.8s' % ('% &amp;nbsp;', 'cumulative', 'self', '')
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print '%5.5s &amp;nbsp;%9.9s &amp;nbsp;%8.8s &amp;nbsp;%-8.8s' % (&amp;quot;time&amp;quot;, &amp;quot;seconds&amp;quot;, &amp;quot;seconds&amp;quot;, &amp;quot;name&amp;quot;)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print('%5.5s %10.10s &amp;nbsp; %7.7s &amp;nbsp;%-8.8s' % ('% &amp;nbsp;', 'cumulative', 'self', ''))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print('%5.5s &amp;nbsp;%9.9s &amp;nbsp;%8.8s &amp;nbsp;%-8.8s' % (&amp;quot;time&amp;quot;, &amp;quot;seconds&amp;quot;, &amp;quot;seconds&amp;quot;, &amp;quot;name&amp;quot;))
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for x in l:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x.display()
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print '---'
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print 'Sample count: %d' % state.sample_count
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print 'Total time: %f seconds' % state.accumulated_time
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print('---')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print('Sample count: %d' % state.sample_count)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print('Total time: %f seconds' % state.accumulated_time)
&lt;br&gt;diff --git a/cheetah/Version.py b/cheetah/Version.py
&lt;br&gt;index 7fdf82f..9cc2e91 100644
&lt;br&gt;--- a/cheetah/Version.py
&lt;br&gt;+++ b/cheetah/Version.py
&lt;br&gt;@@ -32,11 +32,11 @@ def convertVersionStringToTuple(s):
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;if __name__ == '__main__':
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;c = convertVersionStringToTuple
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print c('2.0a1')
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print c('2.0b1')
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print c('2.0rc1')
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print c('2.0')
&lt;br&gt;- &amp;nbsp; &amp;nbsp;print c('2.0.2')
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(c('2.0a1'))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(c('2.0b1'))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(c('2.0rc1'))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(c('2.0'))
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;print(c('2.0.2'))
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;assert c('0.9.19b1') &amp;lt; c('0.9.19')
&lt;br&gt;-- 
&lt;br&gt;1.6.4.2
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270085&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-0-3--Preliminary-refactoring-for-Python-3.xx-compat-tp26270075p26270085.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26270075</id>
	<title>[PATCH 0/3] Preliminary refactoring for Python 3.xx compat</title>
	<published>2009-11-09T09:13:15Z</published>
	<updated>2009-11-09T09:13:15Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">I started experimenting with Python 3.1 this weekend, primarily 
&lt;br&gt;looking at how much work will be needed to get Cheetah running on 
&lt;br&gt;Python 3 while maintaining 2.xx compat.
&lt;br&gt;&lt;br&gt;The unfortunate fact of the matter is that it will likely be 
&lt;br&gt;impossible to run the same codebase on both Python 2.xx (our 
&lt;br&gt;bread and butter) and Python 3.xx (the promised land). 
&lt;br&gt;&lt;br&gt;I plan on creating a &amp;quot;future&amp;quot; branch for Python 3.xx work, 
&lt;br&gt;the idea being Cheetah 2.4.xx will still be where primary 
&lt;br&gt;development work will be done, and features will be &amp;quot;forward-
&lt;br&gt;ported&amp;quot; to the future branch for Cheetah 3000.
&lt;br&gt;&lt;br&gt;Currently, I am undertaking a general refactoring of as much of 
&lt;br&gt;the codebase in a 2.xx/3.xx compatible fashion such that the
&lt;br&gt;ultimate code fork will be minor and maintainable.
&lt;br&gt;&lt;br&gt;This patch series prunes some stale code (VerifyType, unittest_local)
&lt;br&gt;as well as refactors some of the types abuse Cheetah currently
&lt;br&gt;does.
&lt;br&gt;&lt;br&gt;I am also planning to make an API incompatibility change for 
&lt;br&gt;Template.compile(), breaking it out into Template.compile_file() and
&lt;br&gt;Template.compile_str(), that change is not covered in this series.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Comments and review welcome
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;&lt;br&gt;R. Tyler Ballance (3):
&lt;br&gt;&amp;nbsp; Refactor raw print statements in accordance with 2to3
&lt;br&gt;&amp;nbsp; Refactor usage of the &amp;quot;types&amp;quot; module out, per 2to3 -f types
&lt;br&gt;&amp;nbsp; Refactor CheetahWrapper tests to locate my local
&lt;br&gt;&amp;nbsp; &amp;nbsp; cheetah/cheetah-compile in my PATH
&lt;br&gt;&lt;br&gt;&amp;nbsp;SetupConfig.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;SetupTools.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 24 +-
&lt;br&gt;&amp;nbsp;buildandrun &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 66 +++
&lt;br&gt;&amp;nbsp;cheetah/CheetahWrapper.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;8 +-
&lt;br&gt;&amp;nbsp;cheetah/DummyTransaction.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/Filters.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 24 +-
&lt;br&gt;&amp;nbsp;cheetah/ImportManager.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;4 +-
&lt;br&gt;&amp;nbsp;cheetah/NameMapper.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 14 +-
&lt;br&gt;&amp;nbsp;cheetah/Parser.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 15 +-
&lt;br&gt;&amp;nbsp;cheetah/SettingsManager.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;8 +-
&lt;br&gt;&amp;nbsp;cheetah/Template.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/TemplateCmdLineIface.py &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;8 +-
&lt;br&gt;&amp;nbsp;cheetah/Templates/_SkeletonPage.py &amp;nbsp; | &amp;nbsp; 10 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/CheetahWrapper.py &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 31 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Filters.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Misc.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 20 +
&lt;br&gt;&amp;nbsp;cheetah/Tests/Performance.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;8 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Regressions.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/SyntaxAndOutput.py &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;4 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Template.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;4 +-
&lt;br&gt;&amp;nbsp;cheetah/Tests/Test.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; &amp;nbsp;2 +
&lt;br&gt;&amp;nbsp;cheetah/Tests/VerifyType.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;158 ------
&lt;br&gt;&amp;nbsp;cheetah/Tests/unittest_local_copy.py | &amp;nbsp;978 ----------------------------------
&lt;br&gt;&amp;nbsp;cheetah/Tests/xmlrunner.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;4 +-
&lt;br&gt;&amp;nbsp;cheetah/Tools/MondoReport.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;9 +-
&lt;br&gt;&amp;nbsp;cheetah/Tools/SiteHierarchy.py &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 10 +-
&lt;br&gt;&amp;nbsp;cheetah/Utils/Misc.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 22 +-
&lt;br&gt;&amp;nbsp;cheetah/Utils/VerifyType.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 83 ---
&lt;br&gt;&amp;nbsp;cheetah/Utils/memcache.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 50 +-
&lt;br&gt;&amp;nbsp;cheetah/Utils/statprof.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp; 16 +-
&lt;br&gt;&amp;nbsp;cheetah/Version.py &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp; 10 +-
&lt;br&gt;&amp;nbsp;cheetah/c/_verifytype.c &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &amp;nbsp;107 ----
&lt;br&gt;&amp;nbsp;32 files changed, 225 insertions(+), 1482 deletions(-)
&lt;br&gt;&amp;nbsp;create mode 100755 buildandrun
&lt;br&gt;&amp;nbsp;create mode 100644 cheetah/Tests/Misc.py
&lt;br&gt;&amp;nbsp;delete mode 100644 cheetah/Tests/VerifyType.py
&lt;br&gt;&amp;nbsp;delete mode 100755 cheetah/Tests/unittest_local_copy.py
&lt;br&gt;&amp;nbsp;delete mode 100644 cheetah/Utils/VerifyType.py
&lt;br&gt;&amp;nbsp;delete mode 100644 cheetah/c/_verifytype.c
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
&lt;br&gt;trial. Simplify your report design, integration and deployment - and focus on 
&lt;br&gt;what you do best, core application coding. Discover what's new with
&lt;br&gt;Crystal Reports now. &amp;nbsp;&lt;a href=&quot;http://p.sf.net/sfu/bobj-july&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/bobj-july&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26270075&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH-0-3--Preliminary-refactoring-for-Python-3.xx-compat-tp26270075p26270075.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26183399</id>
	<title>Re: Problem with easy_install/setuptools on Cheetah 2.4.0</title>
	<published>2009-11-03T09:32:04Z</published>
	<updated>2009-11-03T09:32:04Z</updated>
	<author>
		<name>Philippe Lafaye</name>
	</author>
	<content type="html">2009/11/3 &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26183399&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; Interesting, I've probably learned this lesson before to be honest (I don't
&lt;br&gt;&amp;gt; really use easy_install).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anyways, I nuked the dumb binary package, mind trying again?
&lt;br&gt;&lt;br&gt;Thanks a lot for the reactivity ! It's work perfectly now !
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Philippe
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26183399&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-easy_install-setuptools-on-Cheetah-2.4.0-tp26182908p26183399.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26183322</id>
	<title>Re: Problem with easy_install/setuptools on Cheetah 2.4.0</title>
	<published>2009-11-03T09:27:06Z</published>
	<updated>2009-11-03T09:27:06Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;On Tue, 03 Nov 2009, Philippe Lafaye wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi everybody
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have some problems with cheetah 2.4.0 it's seems that it's no more
&lt;br&gt;&amp;gt; compatible with easy_install.
&lt;br&gt;&amp;gt; Setuptools try to download Cheetah-2.4.0.linux-i686.tar.gz (a binary
&lt;br&gt;&amp;gt; dump) rather Cheetah-2.4.0.tar.gz
&lt;br&gt;&lt;br&gt;Interesting, I've probably learned this lesson before to be honest (I don't
&lt;br&gt;really use easy_install).
&lt;br&gt;&lt;br&gt;Anyways, I nuked the dumb binary package, mind trying again?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26183322&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26183322/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-easy_install-setuptools-on-Cheetah-2.4.0-tp26182908p26183322.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26182908</id>
	<title>Problem with easy_install/setuptools on Cheetah 2.4.0</title>
	<published>2009-11-03T09:02:02Z</published>
	<updated>2009-11-03T09:02:02Z</updated>
	<author>
		<name>Philippe Lafaye</name>
	</author>
	<content type="html">Hi everybody
&lt;br&gt;&lt;br&gt;I have some problems with cheetah 2.4.0 it's seems that it's no more
&lt;br&gt;compatible with easy_install.
&lt;br&gt;Setuptools try to download Cheetah-2.4.0.linux-i686.tar.gz (a binary
&lt;br&gt;dump) rather Cheetah-2.4.0.tar.gz
&lt;br&gt;&lt;br&gt;logs:
&lt;br&gt;(zwook_instances)17:54 emencia@gaia
&lt;br&gt;~/zwook_instances/instances/instance3% easy_install cheetah
&lt;br&gt;Searching for cheetah
&lt;br&gt;Reading &lt;a href=&quot;http://pypi.python.org/simple/cheetah/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pypi.python.org/simple/cheetah/&lt;/a&gt;&lt;br&gt;Reading &lt;a href=&quot;http://www.CheetahTemplate.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.CheetahTemplate.org/&lt;/a&gt;&lt;br&gt;Reading &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=28961&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/project/showfiles.php?group_id=28961&lt;/a&gt;&lt;br&gt;Reading &lt;a href=&quot;http://www.cheetahtemplate.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cheetahtemplate.org/&lt;/a&gt;&lt;br&gt;Best match: Cheetah 2.4.0.linux-i686
&lt;br&gt;Downloading &lt;a href=&quot;http://pypi.python.org/packages/2.6/C/Cheetah/Cheetah-2.4.0.linux-i686.tar.gz#md5=92cdea17ab49db74b05e0f51ffba039d&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pypi.python.org/packages/2.6/C/Cheetah/Cheetah-2.4.0.linux-i686.tar.gz#md5=92cdea17ab49db74b05e0f51ffba039d&lt;/a&gt;&lt;br&gt;Processing Cheetah-2.4.0.linux-i686.tar.gz
&lt;br&gt;error: Couldn't find a setup script in
&lt;br&gt;/tmp/easy_install-vTpFkL/Cheetah-2.4.0.linux-i686.tar.gz
&lt;br&gt;zsh: exit 1 &amp;nbsp; &amp;nbsp; easy_install cheetah
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26182908&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-with-easy_install-setuptools-on-Cheetah-2.4.0-tp26182908p26182908.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174328</id>
	<title>Re: Cheetah with Python3</title>
	<published>2009-11-02T19:01:31Z</published>
	<updated>2009-11-02T19:01:31Z</updated>
	<author>
		<name>Alan Harris-Reid</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174328&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt; wrote:
&lt;blockquote cite=&quot;mid:20091103000202.GB13164@banana.sharlinx.com&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;On Mon, 02 Nov 2009, Alan Harris-Reid wrote:

  &lt;/pre&gt;
  &lt;blockquote type=&quot;cite&quot;&gt;
    &lt;pre wrap=&quot;&quot;&gt;Thanks for the reply Tyler -  I suppose it's a case of waiting until
a 'critical mass' of Python developers move-over to 3.x before the
3rd-party developers have an incentive to update their products.
(What comes 1st, the chicken or the egg?)
    &lt;/pre&gt;
  &lt;/blockquote&gt;
  &lt;pre wrap=&quot;&quot;&gt;&lt;!----&gt;
I went ahead and installed 3.1 on my laptop the other day after the beginning
of this thread, if that's any consolation ;)

Anyways, the vast majority of Cheetah was written by Tavis for an older version
of Cheetah (just officially killed &quot;support&quot; for 2.3), I've just been keeping
the place clean since. From my initial look, it's not going to be difficult to
run on Python 3.xx, just tedious.

Ideally I'd like to keep the same tree for Python 2.4-3.1 if possible. If
you've got cycles to spare, fork git://github.com/rtyler/cheetah.git
(&lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://github.com/rtyler/cheetah&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler/cheetah&lt;/a&gt;) and start poking about with 2to3.


I'd like to support Python 3, if for nothing other than bragging rights, but I
just don't have a lot of extra bandwidth right now

Cheers,
-R. Tyler Ballance
--------------------------------------
 GitHub: &lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;
Twitter: &lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;
   Blog: &lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;
  &lt;/pre&gt;
&lt;/blockquote&gt;
Unfortunately my knowledge of Python isn't good enough yet to go
'poking around' with anything!&amp;nbsp; I am starting to get going with 3.1,
and I know I will need some sort of templating soon for the work I
intend to do, but AFAIK there's none that work with 3.x.&amp;nbsp; From from the
templating add-ons I've seen of it so far, Cheetah is one of the most
programmer-friendly, so it will be interesting to see if/when it is
ported-over.&lt;br&gt;
&lt;br&gt;
Of course I could have started with 2.6 (and maybe should have), but
that seems a backward step somehow.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Alan&lt;br&gt;
&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174328&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cheetah-with-Python3-tp26147348p26174328.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26172923</id>
	<title>Re: Cheetah with Python3</title>
	<published>2009-11-02T16:02:02Z</published>
	<updated>2009-11-02T16:02:02Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;On Mon, 02 Nov 2009, Alan Harris-Reid wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Thanks for the reply Tyler - &amp;nbsp;I suppose it's a case of waiting until
&lt;br&gt;&amp;gt; a 'critical mass' of Python developers move-over to 3.x before the
&lt;br&gt;&amp;gt; 3rd-party developers have an incentive to update their products.
&lt;br&gt;&amp;gt; (What comes 1st, the chicken or the egg?)
&lt;br&gt;&lt;br&gt;I went ahead and installed 3.1 on my laptop the other day after the beginning
&lt;br&gt;of this thread, if that's any consolation ;)
&lt;br&gt;&lt;br&gt;Anyways, the vast majority of Cheetah was written by Tavis for an older version
&lt;br&gt;of Cheetah (just officially killed &amp;quot;support&amp;quot; for 2.3), I've just been keeping
&lt;br&gt;the place clean since. From my initial look, it's not going to be difficult to
&lt;br&gt;run on Python 3.xx, just tedious.
&lt;br&gt;&lt;br&gt;Ideally I'd like to keep the same tree for Python 2.4-3.1 if possible. If
&lt;br&gt;you've got cycles to spare, fork git://github.com/rtyler/cheetah.git
&lt;br&gt;(&lt;a href=&quot;http://github.com/rtyler/cheetah&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler/cheetah&lt;/a&gt;) and start poking about with 2to3.
&lt;br&gt;&lt;br&gt;&lt;br&gt;I'd like to support Python 3, if for nothing other than bragging rights, but I
&lt;br&gt;just don't have a lot of extra bandwidth right now
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26172923&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26172923/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cheetah-with-Python3-tp26147348p26172923.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26173000</id>
	<title>Re: Cheetah with Python3</title>
	<published>2009-11-02T15:52:06Z</published>
	<updated>2009-11-02T15:52:06Z</updated>
	<author>
		<name>Alan Harris-Reid</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26173000&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt; wrote:
&lt;blockquote cite=&quot;mid:20091101220248.GA572@banana&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;On Sun, 01 Nov 2009, Alan Harris-Reid wrote:

  &lt;/pre&gt;
  &lt;blockquote type=&quot;cite&quot;&gt;
    &lt;pre wrap=&quot;&quot;&gt;I am a newbie to Python and I have started playing-around with 3.1.  
However, I realise that most of the 3rd-party add-ons are still based on 
version 2.5 or 2.6.  Does anyone know what plans there are to port 
Cheetah so it can run under 3.x?
    &lt;/pre&gt;
  &lt;/blockquote&gt;
  &lt;pre wrap=&quot;&quot;&gt;&lt;!----&gt;
Given the number of issues with Python 3.0 I hadn't considered it to be
honest. I'm curious as to whether the Python team has corrected a number
of the performance deficiencies in 3.1?

That said, You're the first person to register any sort of demand for
Cheetah on Python 3.xx that I've heard of (patches welcome!), but at
this point there's not a lot of &quot;production&quot; usage that warrants
updating Cheetah for 3.xx.




Cheers,
-R. Tyler Ballance
--------------------------------------
 GitHub: &lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;
Twitter: &lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;
   Blog: &lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
Thanks for the reply Tyler -&amp;nbsp; I suppose it's a case of waiting until a
'critical mass' of Python developers move-over to 3.x before the
3rd-party developers have an incentive to update their products.&amp;nbsp; (What
comes 1st, the chicken or the egg?)&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Alan&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26173000&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cheetah-with-Python3-tp26147348p26173000.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26158209</id>
	<title>Re: Cheetah with Python3</title>
	<published>2009-11-01T20:15:35Z</published>
	<updated>2009-11-01T20:15:35Z</updated>
	<author>
		<name>Aahz</name>
	</author>
	<content type="html">On Sun, Nov 01, 2009, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26158209&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Given the number of issues with Python 3.0 I hadn't considered it to be
&lt;br&gt;&amp;gt; honest. I'm curious as to whether the Python team has corrected a number
&lt;br&gt;&amp;gt; of the performance deficiencies in 3.1?
&lt;br&gt;&lt;br&gt;Definitely! &amp;nbsp;At least, so I hear; pressures from my new job and other
&lt;br&gt;stuff have kept me somewhat out of the loop lately.
&lt;br&gt;&lt;br&gt;I know that there's an experimental branch of Django for 3.x and I think
&lt;br&gt;it would be worthwhile to at least try 2to3 on Cheetah to see what
&lt;br&gt;happens. &amp;nbsp;If nothing else, the core developers would appreciate knowing
&lt;br&gt;what roadblocks you hit, because they really want 3rd party libraries to
&lt;br&gt;start moving toward 3.x.
&lt;br&gt;-- 
&lt;br&gt;Aahz (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26158209&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aahz@...&lt;/a&gt;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;*&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.pythoncraft.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.pythoncraft.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;quot;You could make Eskimos emigrate to the Sahara by vigorously arguing --
&lt;br&gt;at hundreds of screens' length -- for the wonder, beauty, and utility of
&lt;br&gt;snow.&amp;quot; &amp;nbsp;--PNH to rb in r.a.sf.f
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26158209&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cheetah-with-Python3-tp26147348p26158209.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26155395</id>
	<title>Re: Cheetah with Python3</title>
	<published>2009-11-01T14:03:08Z</published>
	<updated>2009-11-01T14:03:08Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;On Sun, 01 Nov 2009, Alan Harris-Reid wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I am a newbie to Python and I have started playing-around with 3.1. &amp;nbsp;
&lt;br&gt;&amp;gt; However, I realise that most of the 3rd-party add-ons are still based on 
&lt;br&gt;&amp;gt; version 2.5 or 2.6. &amp;nbsp;Does anyone know what plans there are to port 
&lt;br&gt;&amp;gt; Cheetah so it can run under 3.x?
&lt;br&gt;&lt;br&gt;Given the number of issues with Python 3.0 I hadn't considered it to be
&lt;br&gt;honest. I'm curious as to whether the Python team has corrected a number
&lt;br&gt;of the performance deficiencies in 3.1?
&lt;br&gt;&lt;br&gt;That said, You're the first person to register any sort of demand for
&lt;br&gt;Cheetah on Python 3.xx that I've heard of (patches welcome!), but at
&lt;br&gt;this point there's not a lot of &amp;quot;production&amp;quot; usage that warrants
&lt;br&gt;updating Cheetah for 3.xx.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26155395&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26155395/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cheetah-with-Python3-tp26147348p26155395.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26147348</id>
	<title>Cheetah with Python3</title>
	<published>2009-10-31T17:08:57Z</published>
	<updated>2009-10-31T17:08:57Z</updated>
	<author>
		<name>Alan Harris-Reid</name>
	</author>
	<content type="html">I am a newbie to Python and I have started playing-around with 3.1. &amp;nbsp;
&lt;br&gt;However, I realise that most of the 3rd-party add-ons are still based on 
&lt;br&gt;version 2.5 or 2.6. &amp;nbsp;Does anyone know what plans there are to port 
&lt;br&gt;Cheetah so it can run under 3.x?
&lt;br&gt;&lt;br&gt;TIA
&lt;br&gt;Alan
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26147348&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cheetah-with-Python3-tp26147348p26147348.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26044455</id>
	<title>Announcing Cheetah v2.3.0 and v2.4.0</title>
	<published>2009-10-24T18:00:09Z</published>
	<updated>2009-10-24T18:00:09Z</updated>
	<author>
		<name>R. Tyler Ballance</name>
	</author>
	<content type="html">&lt;br&gt;I'm pleased to announce the release of two separate branches of Cheetah,
&lt;br&gt;v2.3.0 and v2.4.0. 
&lt;br&gt;&lt;br&gt;These two releases are largely the same, but the 2.4.xx series of
&lt;br&gt;releases will be where future Cheetah development will occur (master and 
&lt;br&gt;next branches in my git repository) and support Python 2.4 upwards. 
&lt;br&gt;Meanwhile, Cheetah v2.3.xx will be a maintenance (maint branch in git)
&lt;br&gt;series of releases supporting Python 2.3 upwards; I do not intend on
&lt;br&gt;supporting Cheetah v2.3.xx except for occasional backported fixes.
&lt;br&gt;&lt;br&gt;&lt;br&gt;You can download these releases respectively from PyPi:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://pypi.python.org/pypi/Cheetah/2.3.0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pypi.python.org/pypi/Cheetah/2.3.0&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://pypi.python.org/pypi/Cheetah/2.4.0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pypi.python.org/pypi/Cheetah/2.4.0&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The changes (for both) are:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Fix a major performance regression in Template.__init__()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - More graceful handling of unicode when calling .respond() to render a template
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Minor code updates
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Update the default filter (thanks mikeb!)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Let me know if there are any issues, I hope you all enjoy :)
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-R. Tyler Ballance
&lt;br&gt;--------------------------------------
&lt;br&gt;&amp;nbsp;GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26044455&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;attachment0&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26044455/0/attachment0&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Branching-for-Cheetah-2.3.0-2.4.0-tp25914564p26044455.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26013531</id>
	<title>Re: Newbie question: non-escaping	backslashes before placeholders</title>
	<published>2009-10-22T09:54:30Z</published>
	<updated>2009-10-22T09:54:30Z</updated>
	<author>
		<name>Tavis Rudd</name>
	</author>
	<content type="html">I can't think of any 'pretty' way to do it, but here's another approach:
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; print Template(r'''#config_file &amp;quot;$('c:\\%s\\%s'%($p1,$p2))&amp;quot;''', 
&lt;br&gt;... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;namespaces={'p1':'foo', 'p2':'bar'})
&lt;br&gt;#config_file &amp;quot;c:\foo\bar&amp;quot;
&lt;br&gt;&lt;br&gt;Template(r&amp;quot;#config_file $('\\%s\\%s'%($p1,$p2))&amp;quot;)
&lt;br&gt;&lt;br&gt;On Thu, 22 Oct 2009, Jon Mills wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks Tyler, that works fine. It hadn't occurred to my that I could
&lt;br&gt;&amp;gt; use Python's string formatting as well as Cheetah's.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Great support. Thanks again.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Thu, Oct 22, 2009 at 8:31 AM, &amp;nbsp;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26013531&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Thu, 22 Oct 2009, Jon Mills wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Tyler,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Thanks for your quick response, unfortunately that doesn't seem to fix
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; the problem.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If I change my test code to:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; from Cheetah.Template import Template
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; t = Template('#config_file    &amp;quot;c:\${p1}\${p2}&amp;quot;')
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; t.p1 = 'foo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; t.p2 = 'bar'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; print t
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I get the following output:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; #config_file    &amp;quot;c:${p1}${p2}&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Ah right, I'm daft, the backslash is escaping the dollarsign.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I don't think there's a really good means of dealing with this sort of
&lt;br&gt;&amp;gt;&amp;gt; usecase to be honest, you could work around it for now by doing
&lt;br&gt;&amp;gt;&amp;gt; something like:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;        #set cpath = &amp;quot;c:\\%s\\%s&amp;quot; % ($p1, $p2)
&lt;br&gt;&amp;gt;&amp;gt;        \#config_file   &amp;quot;$cpath&amp;quot;
&lt;/div&gt;There's no need to escape #config_file.
&lt;/div&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Less than ideal, I agree, but will at least get you going until I
&lt;br&gt;&amp;gt;&amp;gt; have time to dig into the compiler code
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;&amp;gt; -R. Tyler Ballance
&lt;br&gt;&amp;gt;&amp;gt; --------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;  GitHub: &lt;a href=&quot;http://github.com/rtyler&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://github.com/rtyler&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; Twitter: &lt;a href=&quot;http://twitter.com/agentdero&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://twitter.com/agentdero&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;   Blog: &lt;a href=&quot;http://unethicalblogger.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://unethicalblogger.com&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Thu, Oct 22, 2009 at 8:00 AM,  &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26013531&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tyler@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Thu, 22 Oct 2009, Jon Mills wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm new to Cheetah, and new to this list,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I've got a question that I'm sure must have been asked before, but I
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; can't find the answer in the documentation so I'm hoping somebody can
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; help.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm using Cheetah 2.2.1 / Python 2.5 under Windows to create some
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; config files and I'm having problems creating windows paths.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; There's a cut-down example below.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; from Cheetah.Template import Template
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; t = Template('#config_file    &amp;quot;c:\$p1\$p2&amp;quot;')
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; t.p1 = 'foo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; t.p2 = 'bar'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; print t
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If you wrap them in curly braces you should be fine, i.e.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;        &amp;quot;c:\${p1}\${p2}&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Let me know if that doesn't work for you
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Jon Mills
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26013531&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jonmills@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Sent from Stoke Gifford, South Gloucestershire, United Kingdom
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;&amp;gt; is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;&amp;gt; developing skills, take BlackBerry mobile applications to market and stay
&lt;br&gt;&amp;gt; ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Cheetahtemplate-discuss mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26013531&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;&amp;gt;&lt;/div&gt;&lt;/div&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26013531&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Newbie-question%3A-non-escaping-backslashes-before-placeholders-tp26004240p26013531.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26011820</id>
	<title>Re: Newbie question: non-escaping	backslashes before placeholders</title>
	<published>2009-10-22T08:14:11Z</published>
	<updated>2009-10-22T08:14:11Z</updated>
	<author>
		<name>Aahz</name>
	</author>
	<content type="html">On Thu, Oct 22, 2009, Jon Mills wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; from Cheetah.Template import Template
&lt;br&gt;&amp;gt; t = Template('#config_file &amp;nbsp; &amp;nbsp;&amp;quot;c:\$p1\$p2&amp;quot;')
&lt;br&gt;&lt;br&gt;t = Template('#config_file &amp;nbsp; &amp;nbsp;r&amp;quot;c:\$p1\$p2&amp;quot;')
&lt;br&gt;&lt;br&gt;Note the 'r&amp;quot;' above -- I haven't tested that, though. &amp;nbsp;It might need to
&lt;br&gt;be instead
&lt;br&gt;t = Template(r'#config_file &amp;nbsp; &amp;nbsp;&amp;quot;c:\$p1\$p2&amp;quot;')
&lt;br&gt;or even both
&lt;br&gt;t = Template(r'#config_file &amp;nbsp; &amp;nbsp;r&amp;quot;c:\$p1\$p2&amp;quot;')
&lt;br&gt;-- 
&lt;br&gt;Aahz (&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26011820&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;aahz@...&lt;/a&gt;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;*&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.pythoncraft.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.pythoncraft.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Member of the Groucho Marx Fan Club &amp;nbsp;
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Come build with us! The BlackBerry(R) Developer Conference in SF, CA
&lt;br&gt;is the only developer event you need to attend this year. Jumpstart your
&lt;br&gt;developing skills, take BlackBerry mobile applications to market and stay 
&lt;br&gt;ahead of the curve. Join us from November 9 - 12, 2009. Register now!
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/devconference&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/devconference&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cheetahtemplate-discuss mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26011820&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cheetahtemplate-discuss@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Newbie-question%3A-non-escaping-backslashes-before-placeholders-tp26004240p26011820.html" />
</entry>

</feed>
