<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jason R Briggs &#187; python</title>
	<atom:link href="http://www.briggs.net.nz/log/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.briggs.net.nz/log</link>
	<description>Techie stuff from the perspective of a Kiwi abroad</description>
	<lastBuildDate>Mon, 28 Jun 2010 06:45:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Schlangengerangel für Kinder</title>
		<link>http://www.briggs.net.nz/log/2010/03/15/schlangengerangel-fur-kinder/</link>
		<comments>http://www.briggs.net.nz/log/2010/03/15/schlangengerangel-fur-kinder/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 20:19:00 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=1206</guid>
		<description><![CDATA[Kudos have to go to Joe Ehrensberger for translating &#8220;Snake Wrangling for Kids&#8221; into German. The completed edition of Schlangengerangel für Kinder was just released today. PDFs for Windows, Linux and Mac versions can be downloaded from the Google Code site (this link will take you directly to the downloads). Au ja!]]></description>
			<content:encoded><![CDATA[<p>Kudos have to go to Joe Ehrensberger for translating &#8220;<a href="http://code.google.com/p/swfk">Snake Wrangling for Kids</a>&#8221; into German.</p>
<p>The completed edition of <a href="http://code.google.com/p/swfk-de">Schlangengerangel für Kinder</a> was just released today.  PDFs for Windows, Linux and Mac versions can be downloaded from the Google Code site (this <a href="http://code.google.com/p/swfk-de/downloads/list?can=3&#038;q=&#038;colspec=Filename+Summary+Uploaded+Size+DownloadCount">link</a> will take you directly to the downloads).</p>
<p>Au ja!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2010/03/15/schlangengerangel-fur-kinder/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SWFK Tab Sweep</title>
		<link>http://www.briggs.net.nz/log/2009/12/19/swfk-tab-sweep/</link>
		<comments>http://www.briggs.net.nz/log/2009/12/19/swfk-tab-sweep/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 22:00:42 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=1144</guid>
		<description><![CDATA[This is cool &#8211; SWFK was the top voted comment (option?) on a recent stack overflow discussion about programming for 11 year olds: stackoverflow.com/&#8230;/which-programming-language-is-manageable-by-an-11-year-old-kid There&#8217;s finally a German version in progress: code.google.com/p/swfk-de/ Here&#8217;s a news group discussion about SWFK being used (at least in part) for a course on teaching Python: archives.seul.org/schoolforge/&#8230;/msg00041.html And finally, the [...]]]></description>
			<content:encoded><![CDATA[<p>This is cool &#8211; <a href="http://code.google.com/p/swfk">SWFK</a> was the top voted comment (option?) on a recent <a href="http://stackoverflow.com">stack overflow</a> discussion about programming for 11 year olds:<br />
<a href="http://stackoverflow.com/questions/1621774/which-programming-language-is-manageable-by-an-11-year-old-kid/1621861#1621861">stackoverflow.com/&#8230;/which-programming-language-is-manageable-by-an-11-year-old-kid</a></p>
<p>There&#8217;s finally a German version in progress:<br />
<a href="http://code.google.com/p/swfk-de/">code.google.com/p/swfk-de/</a></p>
<p>Here&#8217;s a news group discussion about SWFK being used (at least in part) for a course on teaching Python:<br />
<a href="http://archives.seul.org/schoolforge/discuss/Jul-2009/msg00041.html">archives.seul.org/schoolforge/&#8230;/msg00041.html</a></p>
<p>And finally, the book also made the list of beginner&#8217;s tools on the sugarlabs wiki:<br />
<a href="http://wiki.sugarlabs.org/go/Development_Team/Resources">wiki.sugarlabs.org/&#8230;/Resources</a></p>
<p>Chuffed.  <img src='http://www.briggs.net.nz/log/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/12/19/swfk-tab-sweep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miscalculations</title>
		<link>http://www.briggs.net.nz/log/2009/09/21/miscalculations/</link>
		<comments>http://www.briggs.net.nz/log/2009/09/21/miscalculations/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 18:41:20 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[commentary]]></category>
		<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=1112</guid>
		<description><![CDATA[I was updating the SWFK project page with the total number of downloads (since I last updated it in March), and discovered that I&#8217;ve miscalculated the figure. I use awstats for my site, and usually just go through all the swfk-*.zip links for each month, using a calculator, to work out the sub-total, then add [...]]]></description>
			<content:encoded><![CDATA[<p>I was updating the <a href="http://code.google.com/p/swfk">SWFK</a> project page with the total number of downloads (since I last updated it in March), and discovered that I&#8217;ve miscalculated the figure.  I use <a href="http://awstats.sourceforge.net/">awstats </a>for my site, and usually just go through all the swfk-*.zip links for each month, using a calculator, to work out the sub-total, then add the downloads from the Google Code project page.  However, this time I used a spreadsheet, and it appears as if I&#8217;ve previously missed a few thousand downloads.  So while I thought the the grand total was around 16K, it looks like it&#8217;s actually in the region of 19K.  Which is something like 18-20GB worth of data &#8212; a reasonably impressive figure, when I think about it.</p>
<p>Perhaps I&#8217;ll throw myself a party when I hit 20K&#8230; <img src='http://www.briggs.net.nz/log/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/09/21/miscalculations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doma De Serpientes Para Niños</title>
		<link>http://www.briggs.net.nz/log/2009/08/04/doma-de-serpientes-para-nino/</link>
		<comments>http://www.briggs.net.nz/log/2009/08/04/doma-de-serpientes-para-nino/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 08:42:24 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=1049</guid>
		<description><![CDATA[&#8230;or &#8220;Snake Wrangling for Kids in Spanish&#8221;, has just been released. Well done to José for getting it finished. Download from the Google project page: http://code.google.com/p/swfk-es Muy bueno! (I hope that&#8217;s right&#8230; )]]></description>
			<content:encoded><![CDATA[<p>&#8230;or &#8220;Snake Wrangling for Kids in Spanish&#8221;, has just been released.  Well done to José for getting it finished.</p>
<p>Download from the Google project page:  <a href="http://code.google.com/p/swfk-es">http://code.google.com/p/swfk-es</a></p>
<p>Muy bueno! (I hope that&#8217;s right&#8230; <img src='http://www.briggs.net.nz/log/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/08/04/doma-de-serpientes-para-nino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domptage de serpent pour les enfants</title>
		<link>http://www.briggs.net.nz/log/2009/07/27/domptage-de-serpent-pour-les-enfants/</link>
		<comments>http://www.briggs.net.nz/log/2009/07/27/domptage-de-serpent-pour-les-enfants/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 19:30:17 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[French]]></category>
		<category><![CDATA[kids]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=1045</guid>
		<description><![CDATA[That&#8217;s Snake Wrangling for Kids, in French for the linguistically challenged. Congratulations to Michel for releasing the first non-English edition of SWFK. Awesome effort! See the project downloads for version 0.0.1. Spanish edition soon to follow (at least judging from the commits)&#8230;]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s <a href="http://code.google.com/p/swfk-fr">Snake Wrangling for Kids, in French</a> for the linguistically challenged.</p>
<p>Congratulations to Michel for releasing the first non-English edition of <a href="http://code.google.com/p/swfk">SWFK</a>.  Awesome effort!<br />
See the project <a href="http://code.google.com/p/swfk-fr/downloads/list">downloads</a> for version 0.0.1.  </p>
<p><a href="http://code.google.com/p/swfk-es">Spanish edition</a> soon to follow (at least judging from the commits)&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/07/27/domptage-de-serpent-pour-les-enfants/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWFK at Google Code</title>
		<link>http://www.briggs.net.nz/log/2009/06/01/swfk-at-google-code/</link>
		<comments>http://www.briggs.net.nz/log/2009/06/01/swfk-at-google-code/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 22:54:59 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=997</guid>
		<description><![CDATA[&#8220;Snake Wrangling for Kids&#8221; is now hosted at Google Code. This includes the Mercurial repository, with all image files (including the cover, which I felt was too large for my repo, but should be fine supported by Google&#8217;s BigTable&#8230; ). Check out the new project page here: http://code.google.com/p/swfk.]]></description>
			<content:encoded><![CDATA[<p>&#8220;Snake Wrangling for Kids&#8221; is now hosted at Google Code.  This includes the Mercurial repository, with all image files (including the cover, which I felt was too large for my repo, but should be fine supported by Google&#8217;s BigTable&#8230; <img src='http://www.briggs.net.nz/log/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ).</p>
<p>Check out the new project page here:  <a href="http://code.google.com/p/swfk">http://code.google.com/p/swfk</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/06/01/swfk-at-google-code/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Stomp.py distribution fixed</title>
		<link>http://www.briggs.net.nz/log/2009/05/02/stomppy-distribution-fixed/</link>
		<comments>http://www.briggs.net.nz/log/2009/05/02/stomppy-distribution-fixed/#comments</comments>
		<pubDate>Sat, 02 May 2009 12:01:28 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[stomp]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=817</guid>
		<description><![CDATA[The distribution file for the Python2 version of stomp.py has been fixed. I had a minor problem in my setup which meant only half the files were included &#8212; not particularly useful to anyone. I&#8217;ve also updated the Python3 version to include optparse for handling arguments, the facility to specify a file of commands as [...]]]></description>
			<content:encoded><![CDATA[<p>The distribution file for the Python2 version of <a href="http://www.briggs.net.nz/log/projects/stomppy">stomp.py</a> has been fixed.  I had a minor problem in my setup which meant only half the files were included &#8212; not particularly useful to anyone.</p>
<p>I&#8217;ve also updated the Python3 version to include <a href="http://docs.python.org/3.0/library/optparse.html">optparse</a> for handling arguments, the facility to specify a file of commands as both a runtime argument and from within the stomp.py console.</p>
<p>For example, you can now do something like:</p>
<pre><code>
python stomp/cli.py --file mycommands.txt
</code></pre>
<p>Which I think is pretty useful, at least.  Feedback welcomed. </p>
<span class="sfforumlink"><a href="http://www.briggs.net.nz/log/forum/stomppy/stomppy-distribution-fixed/"><img src="http://www.briggs.net.nz/log/wp-content/plugins/simple-forum/styles/icons/default/bloglink.png" alt="" /> Join the forum discussion on this post</a> - (1) Posts</span>]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/05/02/stomppy-distribution-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stomp.py for Python3</title>
		<link>http://www.briggs.net.nz/log/2009/04/22/stomppy-for-python3/</link>
		<comments>http://www.briggs.net.nz/log/2009/04/22/stomppy-for-python3/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 22:57:00 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[messaging]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[stomp]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=812</guid>
		<description><![CDATA[A Python3-compatible release of stomp.py is now available, along with doxygen-generated docs (finally). I&#8217;ve done a reasonable amount of tidying up in the Py3k version, along with adding support for sending files from the command-line interface. There have been a few additional bug fixes in both Python2 and Python3 versions. See the project page for [...]]]></description>
			<content:encoded><![CDATA[<p>A Python3-compatible <a href="http://www.briggs.net.nz/sup/projects/stomp.py-2.1.tar.gz">release</a> of stomp.py is now available, along with doxygen-generated <a href="http://www.briggs.net.nz/sup/docs/stomp.py/">docs</a> (finally).  I&#8217;ve done a reasonable amount of tidying up in the Py3k version, along with adding support for sending files from the command-line interface.  There have been a few additional bug fixes in both Python2 and Python3 versions.</p>
<p>See the <a href="http://www.briggs.net.nz/log/projects/stomppy/">project page</a> for more information.  Any problems, as usual either email or (better yet) post in the discussion <a href="http://www.briggs.net.nz/log/forum/stomppy">forum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/04/22/stomppy-for-python3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Template Engine Performance (improvement)</title>
		<link>http://www.briggs.net.nz/log/2009/04/18/template-engine-performance/</link>
		<comments>http://www.briggs.net.nz/log/2009/04/18/template-engine-performance/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 14:43:12 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[proton]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[templating]]></category>
		<category><![CDATA[xhtml]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=791</guid>
		<description><![CDATA[My brilliant (well, in my opinion) idea for a Python templating engine, performed somewhat less than brilliantly compared to the competition. Tenjin, marketed as the fastest template engine in the world, blitzes through 10,000 pages in 5.61 seconds on a Mac Intel CoreDuo 1.83GHz (according to their website). The same benchmark runs on my Mac [...]]]></description>
			<content:encoded><![CDATA[<p>My brilliant (well, in my opinion) <a href="http://code.google.com/p/proton-te">idea</a> for a Python templating engine, performed somewhat less than brilliantly compared to the competition.</p>
<p><a href="http://www.kuwata-lab.com/tenjin/">Tenjin</a>, marketed as the fastest template engine in the world, blitzes through 10,000 pages in 5.61 seconds on a Mac Intel CoreDuo 1.83GHz (according to their website).  The same benchmark runs on my Mac in about 4.98 seconds, so adjusting the other Python templating engines listed on Tenjin&#8217;s website by the same ~11% we get approximate performance of:</p>
<table>
<tr>
<th>pyTenjin (0.6.1)</th>
<td>4.98</td>
</tr>
<tr>
<th>Mako (0.1.9)</th>
<td>12.01</td>
</tr>
<tr>
<th>Myghty (1.1)</th>
<td>17.18</td>
</tr>
<tr>
<th>Cheetah (2.0)</th>
<td>17.64</td>
</tr>
<tr>
<th>Django (0.9.5)</th>
<td>53.22</td>
</tr>
<tr>
<th>Templetor (web.py 0.22)</th>
<td>54.76</td>
</tr>
<tr>
<th>Genshi (0.4.4)</th>
<td>241.80</td>
</tr>
<tr>
<th>Kid (0.9.6)</th>
<td>337.27</td>
</tr>
</table>
<p>The original version of Proton, for the same benchmark, came in at a less than impressive 400+ seconds.  A bit of tidying up reduced the current version to a more respectable (but still abysmal) 280 seconds, putting it between Genshi and Kid.  A couple of other ideas produced even worse performance (more than 800 seconds), but in the meantime, <a href="http://codespeak.net/lxml/">lxml</a> released a Python3 compatible version.  A minor rewrite later, and the lxml version of Proton now runs the benchmark in a far more acceptable 78 seconds.  Putting it between Templetor and Genshi.  Still not even in the top three, but it has the advantage (again in my opinion) of being an entirely more elegant solution, and is now within throwing distance of both Templetor and Django.</p>
<p>Result!</p>
<p>Get the latest version of Proton from the <a href="http://code.google.com/p/proton/downloads/list">Google code</a> project.  You will probably need to download and install the <a href="http://pypi.python.org/pypi/lxml/">source dist</a> of lxml to take advantage of the performance improvement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/04/18/template-engine-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stomp.py Version 2</title>
		<link>http://www.briggs.net.nz/log/2009/04/15/stomppy-version-2/</link>
		<comments>http://www.briggs.net.nz/log/2009/04/15/stomppy-version-2/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 22:53:44 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[messaging]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[stomp]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=785</guid>
		<description><![CDATA[I&#8217;ve refactored stomp.py for the version 2.0 release (yes, I realise I&#8217;ve missed version 1.9, but who&#8217;s going to quibble over a minor&#8230;?). As well as refactoring, I&#8217;ve added help to the command-line client, a facility for recording stats (messages sent/received), and the start of some unit tests. The refactored version 2 is available in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve refactored stomp.py for the version 2.0 release (yes, I realise I&#8217;ve missed version 1.9, but who&#8217;s going to quibble over a minor&#8230;?).</p>
<p>As well as refactoring, I&#8217;ve added help to the command-line client, a facility for recording stats (messages sent/received), and the start of some unit tests.</p>
<p>The refactored version 2 is available in branch &#8220;experimental-r2&#8243;.  Run <code>hg update -C experimental-r2</code> after <code>pull</code>ing the latest changes from the <a href="http://www.briggs.net.nz/hg/stomp.py">repo</a>.</p>
<p>Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/04/15/stomppy-version-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More forums, and a French translation</title>
		<link>http://www.briggs.net.nz/log/2009/03/31/more-forums-and-a-french-translation/</link>
		<comments>http://www.briggs.net.nz/log/2009/03/31/more-forums-and-a-french-translation/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 14:15:22 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[forum]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[stomp]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=763</guid>
		<description><![CDATA[I&#8217;ve finally added a new forum for Snake Wrangling for Kids (python programming book for kids), and another for stomp.py. Neither pages were attracting a huge amount of comment traffic, but even the small number of comments was becoming unmanageable. On the SWFK front, it looks like the French translation is approaching completion &#8212; the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally added a new <a href="http://www.briggs.net.nz/log/forum/snake-wrangling-for-kids">forum</a> for <a href="http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids">Snake Wrangling for Kids</a> (python programming book for kids), and <a href="http://www.briggs.net.nz/log/forum/stomppy">another</a> for <a href="http://www.briggs.net.nz/log/projects/stomppy">stomp.py</a>.</p>
<p>Neither pages were attracting a huge amount of comment traffic, but even the small number of comments was becoming unmanageable.</p>
<p>On the SWFK front, it looks like the French translation is approaching completion &#8212; the current draft looks brilliant (arguably better than the original).  Michel has done an excellent job.  This is the first translation, and I&#8217;m keen to see more&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/03/31/more-forums-and-a-french-translation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWFK 0.7.7</title>
		<link>http://www.briggs.net.nz/log/2009/03/09/swfk-077/</link>
		<comments>http://www.briggs.net.nz/log/2009/03/09/swfk-077/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 22:57:34 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[writing]]></category>
		<category><![CDATA[kids]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=661</guid>
		<description><![CDATA[I&#8217;ve just uploaded the latest version of Snake Wrangling for Kids (verson 0.7.7). This fixes a few minor issues pointed about by readers, and updates the illustrations to higher quality versions (thanks to Michel W). I&#8217;ve also, rather belatedly, re-published (is that a word?) the printable version on Lulu.com, which can be found here. At [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just uploaded the latest version of <a href="http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids">Snake Wrangling for Kids</a> (verson 0.7.7).  This fixes a few minor issues pointed about by readers, and updates the illustrations to higher quality versions (thanks to Michel W).  I&#8217;ve also, rather belatedly, re-published (is that a word?) the printable version on <a href="http://www.lulu.com">Lulu.com</a>, which can be found <a href="https://www.lulu.com/commerce/index.php?fBuyContent=6372170">here</a>.  At the moment, only the Windows version is available.  Once Python3 is *easily* available for Linux and Mac, I&#8217;ll add the printable editions for those platforms as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/03/09/swfk-077/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the Proton Template Engine (part 3)</title>
		<link>http://www.briggs.net.nz/log/2009/01/29/introducing-proton-part-3/</link>
		<comments>http://www.briggs.net.nz/log/2009/01/29/introducing-proton-part-3/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 11:36:27 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[proton]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[xhtml]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=509</guid>
		<description><![CDATA[Templates are usually made up of other templates, especially if you want to re-use page/document components. Proton supports an include function to embed one template inside another. For example, a fragment of a template (include2.xhtml) containing 2 paragraphs of text&#8230; &#60;div&#62; &#60;p eid="para1"&#62;PARA 1 TEXT&#60;/p&#62; &#60;p eid="para2"&#62;PARA 2 TEXT&#60;/p&#62; &#60;/div&#62; &#8230;can be embedded in another [...]]]></description>
			<content:encoded><![CDATA[<p>Templates are usually made up of other templates, especially if you want to re-use page/document components.  Proton supports an <code>include</code> function to embed one template inside another.</p>
<p>For example, a fragment of a template (include2.xhtml) containing 2 paragraphs of text&#8230;</p>
<pre>
&lt;div&gt;
    &lt;p eid="para1"&gt;PARA 1 TEXT&lt;/p&gt;
    &lt;p eid="para2"&gt;PARA 2 TEXT&lt;/p&gt;
&lt;/div&gt;
</pre>
<p>&#8230;can be embedded in another template (include1.xhtml)&#8230;</p>
<pre>
&lt;body&gt;
    &lt;h1 eid="title"&gt;PAGE TITLE GOES HERE&lt;/h1&gt;

    &lt;div eid="includedcontent"&gt;
    INCLUDED CONTENT GOES HERE
    &lt;/div&gt;
&lt;/body&gt;
</pre>
<p>&#8230;and then populated with data, using the following snippet of code:</p>
<pre><code>
tmp = self.templates['include1.xhtml']
tmp.setelement('title', 'Page Title')
tmp.include('includedcontent', 'include2.xhtml')
tmp.setelement('para1', 'First paragraph of text')
tmp.setelement('para2', 'Second paragraph of text')
</code></pre>
<p>&nbsp;</p>
<p>On the &#8216;syntactic sugar front&#8217;, as an alternative to the more explicit <code>repeat</code> function (for repeating elements in the output), Proton supports setting lists of values rather than single-values. Consider the template:</p>
<pre>
&lt;ul&gt;
    &lt;li rid="list-item" eid="list-item"&gt;LIST ITEMS&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>The list can be populated without having to explicitly call <code>repeat</code>, using the following code snippet:</p>
<pre><code>
lst = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g' ]
tmp.setelement('list-item', lst)
</code></pre>
<p>If your objects are decorated with properties (@property), then Proton also supports automatically setting the values in the page, using the convention of id followed by colon followed by property.  For example, using the following template:</p>
<pre>
&lt;dl&gt;
    &lt;dt&gt;X Value&lt;/dt&gt;
    &lt;dd eid="prop:x"&gt;prop x here&lt;/dd&gt;
    &lt;dt&gt;Y Value&lt;/dt&gt;
    &lt;dd eid="prop:y"&gt;prop y here&lt;/dd&gt;
&lt;/dl&gt;
</pre>
<p>A class <code>Temp</code>, with properties <code>x</code> and <code>y</code> can be set in the template, with the name <code>prop</code> and the values will be automatically populated.</p>
<pre><code>
class Temp(object):
    def __init__(self, x, y):
        self._x = x
        self._y = y

    @property
    def x(self):
        return self._x

    @property
    def y(self):
        return self._y

t = Temp('100', '500')
tmp.setelement('prop', t)
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/01/29/introducing-proton-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the Proton Template Engine (part 2)</title>
		<link>http://www.briggs.net.nz/log/2009/01/27/introducing-proton-part-2/</link>
		<comments>http://www.briggs.net.nz/log/2009/01/27/introducing-proton-part-2/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 11:55:49 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[proton]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[xhtml]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=506</guid>
		<description><![CDATA[In a typical template engine, there will be some form of conditional logic, for changing the display of a section of a document. This will generally be an if-statement wrapping one or more elements, perhaps enabling or disabling sections based on access rights, showing more detail based on data, and so on. Proton supports this [...]]]></description>
			<content:encoded><![CDATA[<p>In a typical template engine, there will be some form of conditional logic, for changing the display of a section of a document.  This will generally be an if-statement wrapping one or more elements, perhaps enabling or disabling sections based on access rights, showing more detail based on data, and so on.</p>
<p>Proton supports this logic with the facility to hide an element (marked with the <i>eid</i> attribute).  For example, in this excerpt of a navigation menu:</p>
<pre>
&lt;ul class="menu"&gt;
    &lt;li eid="accounts"&gt;&lt;a href="/accounts"&gt;Account Summary&lt;/a&gt;&lt;/li&gt;
    &lt;li eid="transactions"&gt;&lt;a href="/transactions"&gt;View / Download Transactions&lt;/a&gt;&lt;/li&gt;
    &lt;li eid="transfer"&gt;&lt;a href="/transfer"&gt;Transfer Funds&lt;/a&gt;&lt;/li&gt;
    &lt;li eid="bills"&gt;&lt;a href="/bills"&gt;Bill Payments&lt;/a&gt;&lt;/li&gt;
    &lt;li eid="autopayments"&gt;&lt;a href="/autopayments"&gt;Automatic Payments&lt;/a&gt;&lt;/li&gt;
    &lt;li eid="exchange"&gt;&lt;a href="/exchange"&gt;Foreign Exchange&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>The following code will switch off the &#8220;transactions&#8221;, &#8220;autopayments&#8221; and &#8220;exchange&#8221; elements:</p>
<pre><code>
tmp.hide('autopayments')
tmp.hide('exchange')
tmp.hide('transactions')
</code></pre>
<p>Resulting in output of:</p>
<pre>
&lt;ul class="menu"&gt;
    &lt;li&gt;&lt;a href="/accounts"&gt;Account Summary&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/transfer"&gt;Transfer Funds&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="/bills"&gt;Bill Payments&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>You can see this example in action in the test <a href="http://proton-te.googlecode.com/hg/python/test/hiding.py">hiding.py</a>.</p>
<p>Another, less common but equally useful, feature of template engines is the facility to translate text (in other words, i18n or the internationalisation of output).  Proton supports translation by setting a translation function on a template.  For example, consider the following template:</p>
<pre>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page Title&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Page Title&lt;/h1&gt;

    &lt;p id="para1"&gt;Some translated text&lt;/p&gt;
    &lt;p id="para2"&gt;Not translated text&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>In this case, translation doesn&#8217;t rely on the 3 attributes (eid, aid, rid) &#8212; rather a default set of named (xhtml) elements are translated (the set can, of course, be overridden).  The following code demonstrates translation in action:</p>
<pre><code>
fr = {
    'Page Title' : 'Titre de la page',
    'Some translated text' : 'Certains textes traduits'
}

def translate(text):
    if text in fr:
        return fr[text]
    else:
        return text

tmp = self.templates['tests/i18n.xhtml']
tmp.translate = translate
</code></pre>
<p>And the resulting output:</p>
<pre>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Titre de la page&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Titre de la page&lt;/h1&gt;

    &lt;p id="para1"&gt;Certains textes traduits&lt;/p&gt;
    &lt;p id="para2"&gt;Not translated text&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/01/27/introducing-proton-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing the Proton Template Engine</title>
		<link>http://www.briggs.net.nz/log/2009/01/20/introducing-proton/</link>
		<comments>http://www.briggs.net.nz/log/2009/01/20/introducing-proton/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 06:27:31 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[proton]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[xhtml]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=484</guid>
		<description><![CDATA[I haven&#8217;t come across many (any?) templating engines for Python 3, so it seemed like a good idea to update my own attempt, and then release as an open source (LGPL) project. Proton is a simple, &#8220;code-less&#8221; engine for xml/xhtml templates. Code-less, because it uses 3 types of ID (attribute) in a template file, rather [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t come across many (any?) templating engines for <a href="http://docs.python.org/3.0/">Python 3</a>, so it seemed like a good idea to update my own attempt, and then release as an open source (<a href="http://proton-te.googlecode.com/hg/python/proton/license.txt">LGPL</a>) project.</p>
<p><a href="http://code.google.com/p/proton-te">Proton</a> is a simple, &#8220;code-less&#8221; engine for xml/xhtml templates.  Code-less, because it uses 3 types of ID (attribute) in a template file, rather than snippets of code &#8212; this moves the complexity out of the template and into the application (where I think it belongs).  </p>
<p>The following template demonstrates basic use of the 3 IDs:</p>
<pre>
&lt;html&gt;
&lt;head&gt;
&lt;title eid="title"&gt;PAGE TITLE&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1 eid="title"&gt;PAGE TITLE&lt;/h1&gt;

    &lt;p&gt;&lt;a eid="link" aid="link" href=""&gt;LINK ITEM&lt;/a&gt;&lt;/p&gt;

    &lt;ul&gt;
        &lt;li rid="list-item" eid="list-item"&gt;LIST ITEMS&lt;/li&gt;
    &lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The attribute &#8220;<em>eid</em>&#8221; is used to change the value of an element, or hide the element.  &#8220;<em>aid</em>&#8221; is used to change the value of an attribute, and &#8220;<em>rid</em>&#8221; is used for repeating elements.   This might seem a bit simplistic, but it covers the fundamentals of most templating tasks.</p>
<p>The following code demonstrates the use of the template:</p>
<pre><code>
tmp = Templates()['test.xhtml']

tmp.setelement('title', 'An Xhtml Page', '*')
tmp.setelement('link', 'This is a link to Google')
tmp.setattribute('link', 'href', 'http://www.google.com')

tmp.repeat('list-item', 5)
for x in range(0, 5):
    tmp.setelement('list-item', 'test%s' % x, x)

print(str(tmp))
</code></pre>
<p>I used an earlier version of Proton for my own (rather ill-fated) project; a web-based system for timesheet and invoice management, so it has been tested in some relatively complicated scenarios &#8212; however, I am keen to hear where it falls down.  i.e. complex pages where using 3 attributes just doesn&#8217;t cut it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2009/01/20/introducing-proton/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>11K</title>
		<link>http://www.briggs.net.nz/log/2008/12/30/eleven-thousand/</link>
		<comments>http://www.briggs.net.nz/log/2008/12/30/eleven-thousand/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 11:43:49 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=479</guid>
		<description><![CDATA[A recent visit by Slashdotters (which I had no idea had happened until after the fact) finally tipped the download stats for SWFK over 10K. 11767 (at time of writing), to be exact. I have no idea how that compares to &#8216;real&#8217; books (i.e. stuff that is printed&#8230; or sold in fact), but it seems [...]]]></description>
			<content:encoded><![CDATA[<p>A recent visit by <a href="http://www.slashdot.org">Slashdot</a>ters (which I had no idea had happened until after the fact) finally tipped the download stats for <a href="http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids">SWFK</a> over 10K.  11767 (at time of writing), to be exact.</p>
<p>I have no idea how that compares to &#8216;real&#8217; books (i.e. stuff that is printed&#8230; or sold in fact), but it seems like a reasonably impressive number to me&#8230; at least, for an unmarketed, self-published effort.</p>
<p>Thanks for your support, and hopefully your kids are finding it useful. <img src='http://www.briggs.net.nz/log/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2008/12/30/eleven-thousand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWFK for Python 3&#8230; redux</title>
		<link>http://www.briggs.net.nz/log/2008/12/17/swfk-for-python-3-redux/</link>
		<comments>http://www.briggs.net.nz/log/2008/12/17/swfk-for-python-3-redux/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 11:46:25 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=473</guid>
		<description><![CDATA[Slight problem with the 0.7.5 version of Snake Wrangling for Kids. My check script, which ran through 99% of the code samples in the book, wasn&#8217;t functioning quite as well as intended. It&#8217;s now fixed (well better than it was), and I&#8217;ve hopefully tidied up a few loose ends. If anyone has downloaded a copy [...]]]></description>
			<content:encoded><![CDATA[<p>Slight problem with the 0.7.5 version of Snake Wrangling for Kids.  My check script, which ran through 99% of the code samples in the book, wasn&#8217;t functioning quite as well as intended.</p>
<p>It&#8217;s now fixed (well better than it was), and I&#8217;ve hopefully tidied up a few loose ends.  If anyone has downloaded a copy in the last few days (version 0.7.5), I suggest downloading again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2008/12/17/swfk-for-python-3-redux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWFK for Python 3</title>
		<link>http://www.briggs.net.nz/log/2008/12/10/swfk-for-python-3/</link>
		<comments>http://www.briggs.net.nz/log/2008/12/10/swfk-for-python-3/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 09:34:33 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[writing]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[swfk]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=464</guid>
		<description><![CDATA[I&#8217;ve updated &#8220;Snake Wrangling for Kids&#8221; to be compatible with Python 3. This mainly consisted of replacing &#8220;print blah&#8221; with &#8220;print(blah)&#8221;, fixing problems with range, and otherwise tidying up a few mistakes, errors, etc. I&#8217;ve also taken the opportunity to replace the existing green-coloured code samples, with a plain black, larger font &#8212; apparently the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated &#8220;Snake Wrangling for Kids&#8221; to be compatible with <a href="http://www.python.org/download/releases/3.0/">Python 3</a>.  This mainly consisted of replacing &#8220;print <i>blah</i>&#8221; with &#8220;print(<i>blah</i>)&#8221;, fixing problems with range, and otherwise tidying up a few mistakes, errors, etc.</p>
<p>I&#8217;ve also taken the opportunity to replace the existing green-coloured code samples, with a plain black, larger font &#8212; apparently the green version didn&#8217;t print that well.  Particularly on older lasers.  </p>
<p>Both the new version, and the previous version for Python 2 are now available from the <a href="http://www.briggs.net.nz/log/writing/snake-wrangling-for-kids">SWFK page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2008/12/10/swfk-for-python-3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>MAMP, MySQL and Python</title>
		<link>http://www.briggs.net.nz/log/2008/10/16/mamp-mysql-and-python/</link>
		<comments>http://www.briggs.net.nz/log/2008/10/16/mamp-mysql-and-python/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 08:27:32 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=413</guid>
		<description><![CDATA[Installing MySQLdb on a Mac is slightly more challenging than expected. It seems like it&#8217;s easy enough if you go down the dmg install route; however, I decided to save some time and install the s/w stack I needed using MAMP. Which really is a brilliant time-saver&#8230; but not when it comes time to get [...]]]></description>
			<content:encoded><![CDATA[<p>Installing <a href="http://sourceforge.net/projects/mysql-python">MySQLdb</a> on a Mac is slightly more challenging than expected.  It seems like it&#8217;s <a href="http://www.thinkspot.net/sheila/article.php?story=20050403232040461">easy enough</a> if you go down the dmg install route; however, I decided to save some time and install the s/w stack I needed using <a href="http://www.mamp.info/en/index.php">MAMP</a>.  Which really is a brilliant time-saver&#8230; but not when it comes time to get Python and MySQL talking to each other.</p>
<p>I had a number of problems, some of which are documented <a href="http://blog.fourspaces.com/2008/07/16/python-mysql-mac-frustration/">here</a>, and starting with this thread <a href="http://forums.mysql.com/read.php?50,175059,175059#msg-175059">here</a>.  However, the final clue came from <a href="http://forums.mysql.com/read.php?50,175059,185003">this post</a>.  I&#8217;ve differed slightly from his solution, basically performing the following steps:</p>
<p>1. install MySQL using <a href="http://www.macports.org/">MacPorts</a>.</p>
<p>2. copy the libmysqlclient_r dylibs from the mysql dir to the MAMP lib dir, with something like:</p>
<p><code>cp /opt/local/lib/mysql5/mysql/libmysqlclient_r*dylib /Applications/MAMP/Library/lib/mysql/</code></p>
<p>3.  run the build for MySQLdb (<code>python setup.py build</code>).  The final step fails, but you can re-run the GCC command to remove the wrong architecture (-arch) option.  In my case, it unnecessarily added <code>-arch ppc</code>.  So my final gcc exec is:</p>
<p><code>gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 build/temp.macosx-10.5-i386-2.5/_mysql.o -L/opt/local/lib -L/opt/local/lib/mysql5/mysql -L/opt/local/lib -L/opt/local/lib -lmysqlclient_r -lz -lm -lssl -lcrypto -o build/lib.macosx-10.5-i386-2.5/_mysql.so</code></p>
<p>4. create a dir in /Library/Python/2.5/site-packages called MySQLdb and copy the contents of build/lib.macosx-10.5-i386-2.5/ and build/lib.macosx-10.5-i386-2.5/MySQLdb into it.</p>
<p>With any luck you should now be able to connect to the MAMP install of MySQL through Python.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2008/10/16/mamp-mysql-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minor updates to stomp.py</title>
		<link>http://www.briggs.net.nz/log/2008/09/11/minor-updates-to-stomppy/</link>
		<comments>http://www.briggs.net.nz/log/2008/09/11/minor-updates-to-stomppy/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 11:16:01 +0000</pubDate>
		<dc:creator>jrbriggs</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.briggs.net.nz/log/?p=385</guid>
		<description><![CDATA[I&#8217;ve just committed some minor updates to my Stomp client (stomp.py): 1. removed the &#8216;lower()&#8217; on header keywords to support case-sensitive headers (patch submitted by Eugene S). 2. added the facility to wait until the socket is connected before issuing a &#8220;CONNECT&#8221; 3. removed the space between header and value (i.e. header: value becomes header:value) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just committed some minor updates to my Stomp client (<a href="http://www.briggs.net.nz/log/projects/stomppy/">stomp.py</a>):</p>
<p>1.  removed the &#8216;lower()&#8217; on header keywords to support case-sensitive headers (patch submitted by Eugene S).</p>
<p>2.  added the facility to wait until the socket is connected before issuing a &#8220;CONNECT&#8221;</p>
<p>3.  removed the space between header and value (i.e. header: value becomes header:value) which fixes an incompatibility with RabbitMQ</p>
<p>4.  added the missing connect headers (user/pass) to the &#8220;CONNECT&#8221; command (again fixes an incompatibility with Rabbit).</p>
<p>As usual changes are committed and you can get the latest version from my Mercurial repo <a href="http://www.briggs.net.nz/hg/stomp.py/raw-file/tip/stomp.py">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.briggs.net.nz/log/2008/09/11/minor-updates-to-stomppy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
