<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<feed xmlns="http://www.w3.org/2005/Atom">

	<title>Planet London Python</title>
	<link rel="self" href="http://londonpython.org.uk/atom.xml"/>
	<link href="http://londonpython.org.uk/"/>
	<id>http://londonpython.org.uk/atom.xml</id>
	<updated>2012-02-05T00:22:26+00:00</updated>
	<generator uri="http://www.planetplanet.org/">Planet/2.0 +http://www.planetplanet.org</generator>

	<entry xml:lang="en">
		<title type="html">We survived! A London Python Dojo without @ntoll</title>
		<link href="http://ramblings.timgolden.me.uk/2012/02/03/we-survived-a-london-python-dojo-without-ntoll/"/>
		<id>http://ramblings.timgolden.me.uk/2012/02/03/we-survived-a-london-python-dojo-without-ntoll/</id>
		<updated>2012-02-03T11:09:02+00:00</updated>
		<content type="html">&lt;p&gt;[Note to self: blog about things other than the London Dojo&amp;#8230;]&lt;/p&gt;
&lt;p&gt;Nicholas &amp;#8220;@ntoll&amp;#8221; Tollervey has been the London Python Dojo&amp;#8217;s parent for all its young life. Once it achieved toddler status, he felt confident enough to start letting other people look after his baby, so over the past few Dojos various other people have run things on the day, always with @ntoll in attendance. Yesterday was the first day on which he felt confident enough not to be there, leaving things in the hands of @tomviner (who could be seen consulting a trusty checklist throughout the evening).&lt;/p&gt;
&lt;p&gt;As I re-read, I realise that it looks as though I&amp;#8217;m accusing @ntoll of being over-possessive, which I most definitely am not. He&amp;#8217;s done &amp;#8212; and continues to do &amp;#8212; a fantastic job at organising the Dojo and making it happen even when he&amp;#8217;s not the evening&amp;#8217;s MC. We&amp;#8217;re just delighted, as Tom said last night, that he doesn&amp;#8217;t feel that he needs to attend it every first Thursday for the rest of his life. (A little secret: the day before this month&amp;#8217;s Dojo he was still sending mother-like emails to the rest of the organisers: don&amp;#8217;t forget to &amp;#8230; remember that &amp;#8230; have you &amp;#8230;?)&lt;/p&gt;
&lt;p&gt;Last night&amp;#8217;s Dojo was fun as usual: we were doing the famous &lt;a href=&quot;http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life&quot;&gt;Game of Life&lt;/a&gt; &amp;#8212; probably a text book example of a text book example! Uniquely in my experience, every team had a working version to show after just an hour and a half. The team I was in managed to get something working while @john_chandler and I were still chatting in the background. We fiddled about with it a bit, adding a few preset forms to seed the board etc.&lt;/p&gt;
&lt;p&gt;An unexpected visitor was @JohnPinner (of PyConUK fame). He was in London for a meeting and timed things so he could come along for the start of the Dojo, altho&amp;#8217; he had to dash after about an hour to catch his train home. He gave a lightning talk at the beginning outlining various Python-related conferences and training sessions which in the offing. Including this year&amp;#8217;s &lt;a href=&quot;http://pyuk2012.pyconuk.org/&quot;&gt;PyConUK&lt;/a&gt;, once again in Coventry.&lt;/p&gt;
&lt;p&gt;@tomviner&amp;#8217;s novelty for this Dojo was the favourite-module question on the sign-up form, which was also used as part of the introduction session. Perhaps unsurprisingly, Kenneth Reitz&amp;#8217;s &lt;a href=&quot;http://docs.python-requests.org/en/latest/index.html&quot;&gt;requests&lt;/a&gt; module was the clear winner (the only one with more than one vote!). Other unsurprising entries included itertools and collections, but there was a variety of others. I was chatting with John Pinner about the line-up for PyConUK this year, and he pointed out that there&amp;#8217;s some mileage for simple talks about a particular module, eg logging or itertools. I&amp;#8217;m thinking of proposing such a thing for future Dojos&amp;#8230;&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s also been &lt;a href=&quot;http://mail.python.org/pipermail/python-uk/2012-January/002399.html&quot;&gt;talk on the python-uk mailing list&lt;/a&gt; of a second London-based Dojo, or other Python event, on a Sunday. That might suit some people who can&amp;#8217;t make a weekday evening in London but who could manage a weekend. And the more Python events in London the better!&lt;/p&gt;</content>
		<author>
			<name>Tim Golden</name>
			<uri>http://ramblings.timgolden.me.uk</uri>
		</author>
		<source>
			<title type="html">Moderate Realism » Tech</title>
			<subtitle type="html">The ramblings of Tim Golden</subtitle>
			<link rel="self" href="http://ramblings.timgolden.me.uk/category/tech/feed"/>
			<id>http://ramblings.timgolden.me.uk/category/tech/feed</id>
			<updated>2012-02-03T12:22:08+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Callable object with state using generators</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/1qE6GVVg23E/arch_d7_2012_01_21.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/1qE6GVVg23E/arch_d7_2012_01_21.shtml</id>
		<updated>2012-01-22T15:05:46+00:00</updated>
		<content type="html">It's often convenient to create callable objects that maintain some kind of state. In Python we can do this with objects that implement the __call__ method and store the state as instance attributes. ... [596 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=1qE6GVVg23E:_oxAQaVOhA4:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=1qE6GVVg23E:_oxAQaVOhA4:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=1qE6GVVg23E:_oxAQaVOhA4:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=1qE6GVVg23E:_oxAQaVOhA4:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=1qE6GVVg23E:_oxAQaVOhA4:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=1qE6GVVg23E:_oxAQaVOhA4:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=1qE6GVVg23E:_oxAQaVOhA4:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/1qE6GVVg23E&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">New Talk: Designing For Rapid Release</title>
		<link href="http://feedproxy.google.com/~r/Magpiebrain/~3/AN8QfZr_vE0/"/>
		<id>http://www.magpiebrain.com/?p=1129</id>
		<updated>2012-01-14T18:23:48+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;#8217;ll be running my new talk &amp;#8220;Designing For Rapid Release&amp;#8221; at a couple of conferences in the first half of this year. First up is the delightfully named &lt;a href=&quot;http://swdc.se/crashandburn2012/&quot;&gt;Crash &amp;#038; Burn&lt;/a&gt; in Stockholm, on the 2nd of March. Then later in May I&amp;#8217;ll be at Poznan in Poland for &lt;a href=&quot;http://2012.geecon.org/&quot;&gt;GeeCon 2012&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;This talk focuses on the kinds of constraints we should consider when evolving their architecture of our systems in order to enable rapid, frequent release. So much of the conversation about Continuous Delivery focuses on the design of build pipelines, or the nuts and bolts of CI and infrastructure automation. But often the biggest constraint in being able to incrementally roll out new features are the problems in the design of the system itself. I&amp;#8217;ll be pulling together a series of patterns that will help you identify what to look for in your own systems when moving towards Continuous Delivery.&lt;/p&gt;
&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=AN8QfZr_vE0:CVq-2iwib-Q:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=AN8QfZr_vE0:CVq-2iwib-Q:7Q72WNTAKBA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=7Q72WNTAKBA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=AN8QfZr_vE0:CVq-2iwib-Q:D7DqB2pKExk&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?i=AN8QfZr_vE0:CVq-2iwib-Q:D7DqB2pKExk&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=AN8QfZr_vE0:CVq-2iwib-Q:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<author>
			<name>Sam Newman</name>
			<uri>http://www.magpiebrain.com</uri>
		</author>
		<source>
			<title type="html">Magpiebrain</title>
			<link rel="self" href="http://feeds.feedburner.com/Magpiebrain"/>
			<id>http://feeds.feedburner.com/Magpiebrain</id>
			<updated>2012-02-05T00:22:04+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Simple mocking of open as a context manager</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/iAQ3FfQ-xKg/arch_d7_2012_01_07.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/iAQ3FfQ-xKg/arch_d7_2012_01_07.shtml</id>
		<updated>2012-01-13T12:18:35+00:00</updated>
		<content type="html">Using open as a context manager is a great way to ensure your file handles are closed properly and is becoming common: with open('/some/path', 'w') as f: f.write('something') The issue is that even if you mock out the call to open it is the returned object that is used as a context manager (and has __enter__ and __exit__ called). Using MagicMock from the mock library, we can mock out context managers very simply. ... [320 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=iAQ3FfQ-xKg:HtP4LsCdEvU:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=iAQ3FfQ-xKg:HtP4LsCdEvU:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=iAQ3FfQ-xKg:HtP4LsCdEvU:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=iAQ3FfQ-xKg:HtP4LsCdEvU:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=iAQ3FfQ-xKg:HtP4LsCdEvU:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=iAQ3FfQ-xKg:HtP4LsCdEvU:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=iAQ3FfQ-xKg:HtP4LsCdEvU:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/iAQ3FfQ-xKg&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Mocks with some attributes not present</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/YOhkuo1iJSk/arch_d7_2012_01_07.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/YOhkuo1iJSk/arch_d7_2012_01_07.shtml</id>
		<updated>2012-01-12T12:33:15+00:00</updated>
		<content type="html">Mock objects, from the mock library, create attributes on demand. This allows them to pretend to be objects of any type. ... [199 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=YOhkuo1iJSk:C6Xv1Mr6HH0:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=YOhkuo1iJSk:C6Xv1Mr6HH0:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=YOhkuo1iJSk:C6Xv1Mr6HH0:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=YOhkuo1iJSk:C6Xv1Mr6HH0:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=YOhkuo1iJSk:C6Xv1Mr6HH0:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=YOhkuo1iJSk:C6Xv1Mr6HH0:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=YOhkuo1iJSk:C6Xv1Mr6HH0:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/YOhkuo1iJSk&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">IMAPClient 0.8.1 released</title>
		<link href="http://freshfoo.com/blog/IMAPClient-0.8.1"/>
		<id>http://freshfoo.com/blog/2012/01/11/IMAPClient-0.8.1</id>
		<updated>2012-01-11T23:20:00+00:00</updated>
		<content type="html">&lt;p&gt;Version 0.8.1 of IMAPClient has just been released. This version works around a
subtle bug in distutils which was preventing installation on Windows from
working. Thanks to Bob Yexley for the bug report.&lt;/p&gt;
&lt;p&gt;This release also contains a few small documentation updates and packaging
fixes. The &lt;a class=&quot;reference external&quot; href=&quot;http://imapclient.freshfoo.com/browser/NEWS&quot;&gt;NEWS&lt;/a&gt; file has more details.&lt;/p&gt;
&lt;p&gt;As always, IMAPClient can be installed from PyPI (&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;install&lt;/span&gt;
&lt;span class=&quot;pre&quot;&gt;imapclient&lt;/span&gt;&lt;/tt&gt;) or downloaded from the &lt;a class=&quot;reference external&quot; href=&quot;http://imapclient.freshfoo.com/&quot;&gt;IMAPClient site&lt;/a&gt;.&lt;/p&gt;</content>
		<author>
			<name>Menno Smits</name>
			<email>menno AT freshfoo DOT com</email>
			<uri>http://freshfoo.com/blog</uri>
		</author>
		<source>
			<title type="html">Menno's Musings</title>
			<subtitle type="html">software | life | whatever</subtitle>
			<link rel="self" href="http://freshfoo.com/blog/index.atom"/>
			<id>http://freshfoo.com/blog/index.atom</id>
			<updated>2012-02-05T00:22:21+00:00</updated>
			<rights type="html">Copyright 2009 Menno Smits</rights>
		</source>
	</entry>

	<entry>
		<title type="html">mock 0.8rc2: new release and development docs</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/iNsW22_Sb74/arch_d7_2012_01_07.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/iNsW22_Sb74/arch_d7_2012_01_07.shtml</id>
		<updated>2012-01-11T02:13:32+00:00</updated>
		<content type="html">I've pushed out a new release of mock. This fixes an inconsistency in the create_autospec api I discovered whilst working on the docs (yes I've really been working on the docs), and a fix for a bug with using ANY. ... [190 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=iNsW22_Sb74:RKfWd72U1HM:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=iNsW22_Sb74:RKfWd72U1HM:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=iNsW22_Sb74:RKfWd72U1HM:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=iNsW22_Sb74:RKfWd72U1HM:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=iNsW22_Sb74:RKfWd72U1HM:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=iNsW22_Sb74:RKfWd72U1HM:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=iNsW22_Sb74:RKfWd72U1HM:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/iNsW22_Sb74&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Python on Google Plus</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/gK_0hvjHSFA/arch_d7_2011_12_31.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/gK_0hvjHSFA/arch_d7_2011_12_31.shtml</id>
		<updated>2012-01-03T11:41:02+00:00</updated>
		<content type="html">As you may (or perhaps not) have noticed, I've been blogging a lot less in the last year. A new job with Canonical (although I've been there over a year now) and an eight month old daughter all make blogging harder. ... [83 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=gK_0hvjHSFA:Izo_yNE6Ofg:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=gK_0hvjHSFA:Izo_yNE6Ofg:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=gK_0hvjHSFA:Izo_yNE6Ofg:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=gK_0hvjHSFA:Izo_yNE6Ofg:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=gK_0hvjHSFA:Izo_yNE6Ofg:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=gK_0hvjHSFA:Izo_yNE6Ofg:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=gK_0hvjHSFA:Izo_yNE6Ofg:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/gK_0hvjHSFA&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Sphinx doctests and the execution namespace</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/mNei5C2uzww/arch_d7_2011_12_31.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/mNei5C2uzww/arch_d7_2011_12_31.shtml</id>
		<updated>2012-01-01T00:28:03+00:00</updated>
		<content type="html">I've finally started work on the documentation for mock 0.8 release, and much of it involves converting the write-ups I did in the blog entries. The mock documentation is built with the excellent Sphinx (of course!) ... [402 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=mNei5C2uzww:OgH5yPHMTcM:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=mNei5C2uzww:OgH5yPHMTcM:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=mNei5C2uzww:OgH5yPHMTcM:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=mNei5C2uzww:OgH5yPHMTcM:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=mNei5C2uzww:OgH5yPHMTcM:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=mNei5C2uzww:OgH5yPHMTcM:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=mNei5C2uzww:OgH5yPHMTcM:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/mNei5C2uzww&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">mock 0.8 release candidate 1 and handling mutable arguments</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/4cyybb3Vx8w/arch_d7_2011_12_24.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/4cyybb3Vx8w/arch_d7_2011_12_24.shtml</id>
		<updated>2011-12-29T13:04:47+00:00</updated>
		<content type="html">I've released mock 0.8 release candidate 1. You can download it it or install it with: pip install -U mock==dev mock is a library for testing in Python. ... [613 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=4cyybb3Vx8w:1VDhp2XefGM:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=4cyybb3Vx8w:1VDhp2XefGM:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=4cyybb3Vx8w:1VDhp2XefGM:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=4cyybb3Vx8w:1VDhp2XefGM:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=4cyybb3Vx8w:1VDhp2XefGM:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=4cyybb3Vx8w:1VDhp2XefGM:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=4cyybb3Vx8w:1VDhp2XefGM:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/4cyybb3Vx8w&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Nothing Stranger Than This?</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/uMO8WOXwJHw/nothing-stranger-than-this.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-2423819233541420234</id>
		<updated>2011-12-16T01:03:40+00:00</updated>
		<content type="html">I’ve just been reading Stack Overflow’s &lt;i&gt;&lt;a href=&quot;http://stackoverflow.com/questions/1995113/strangest-language-feature&quot; target=&quot;_blank&quot;&gt;Strangest Language Feature&lt;/a&gt;&lt;/i&gt;&amp;nbsp;thread, where I discover that (at the time of writing) the highest-voted Python complaint is actually about Java, but the complainant claims that JavaScript and Python are the same. So after I've got this off my chest I'll perhaps go back and look for the top complaint specifically about Python. In Java the complained-of code looks like this:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; try {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; } finally {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
This naturally translates into&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; try:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return True&lt;br /&gt;
&amp;nbsp; &amp;nbsp; finally:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return False&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
which, under every recent CPython I've tried (2.{6,7}.X and 3.X), returns False. What I can’t understand is why anyone would expect anything different. If the &lt;b&gt;finally&lt;/b&gt;&amp;nbsp;suite contains a return then it’s pretty apparent that the programmer of that function wanted the function to always return a specific value. If there had been code following the &lt;b&gt;return&lt;/b&gt;&amp;nbsp;statement would the complainers have expected that to be executed? I'm not sure I see the reason for the complaint at all. What would the complainers have this function return? What is the &lt;b&gt;return&lt;/b&gt;&amp;nbsp;statement supposed to do?&lt;br /&gt;
&lt;br /&gt;
This gave rise to a further thought: does a &lt;b&gt;return&lt;/b&gt;&amp;nbsp;in a &lt;b&gt;finally&lt;/b&gt;&amp;nbsp;clause suppress any active exception?&amp;nbsp;This is only one of a number of exception-handling issues I've been thinking about lately, kind of noodling around the corner cases. More later.&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-2423819233541420234?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=uMO8WOXwJHw:oTeznXdbjRU:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=uMO8WOXwJHw:oTeznXdbjRU:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=uMO8WOXwJHw:oTeznXdbjRU:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/uMO8WOXwJHw&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">FLVio - Video Web Service</title>
		<link href="http://chrismiles.livejournal.com/23975.html"/>
		<id>urn:lj:livejournal.com:atom1:chrismiles:23975</id>
		<updated>2011-12-14T22:05:20+00:00</updated>
		<content type="html">I have spent most of this year, so far, designing and building a video web service, which has been branded as &lt;a href=&quot;http://www.flvio.com/&quot; rel=&quot;nofollow&quot;&gt;FLVio&lt;/a&gt;.  We have just &lt;a href=&quot;http://www.pressdispensary.co.uk/releases/c991766.php&quot; rel=&quot;nofollow&quot;&gt;announced the launch of FLVio&lt;/a&gt; with our &lt;a href=&quot;http://www.wanobe.com/&quot; rel=&quot;nofollow&quot;&gt;first live customer&lt;/a&gt;, one of a few who helped us with beta testing.&lt;br /&gt;&lt;br /&gt;The idea behind FLVio is to solve all the problems behind adding video content (especially UGC) to a web site.  Every second web site that launches nowadays seems to be some kind of social network, and many of them want all the bells &amp;amp; whistles that the &lt;a href=&quot;http://www.facebook.com/&quot; rel=&quot;nofollow&quot;&gt;big&lt;/a&gt; &lt;a href=&quot;http://www.myspace.com/&quot; rel=&quot;nofollow&quot;&gt;guys&lt;/a&gt; have, including user-generated video content.  FLVio helps small (and large) businesses integrate video content without the pain and upfront expense, by solving these key problems:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; storage&lt;/li&gt;&lt;br /&gt;&lt;li&gt; encoding&lt;/li&gt;&lt;br /&gt;&lt;li&gt; delivery&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;Videos are relatively large, so you need reliable storage, and plenty of it. Simple as that.&lt;br /&gt;&lt;br /&gt;Videos (especially UGC) can be uploaded in any of a huge variety of video formats and codecs, all of which need to be re-encoded into a format that is playable within the browser and optimised for efficient web delivery.  FLVio encodes almost all non-proprietary formats into Flash-compatible video (FLV and H.264), solving the other problem with re-encoding and that is CPU resources. The last thing you want to do is to have your web application server grinding away to re-encode user uploaded videos into FLV.  Offloading that workload to FLVio leaves your server resources available for rendering web applications as they should be.&lt;br /&gt;&lt;br /&gt;FLVio delivers video via progressive HTTP download, the favoured method these days for serving Flash-based video.  Videos are served directly from the FLVio web servers to the web browser, avoiding the need to scale up your own web farm to handle the multitude of long-lived requests that media delivery typically requires, not to mention the unknown bandwidth costs that media delivery can add.  FLVio has partnered with a Content Delivery Network (CDN) provider so that we can also accelerate media delivery for the best possible user experience.&lt;br /&gt;&lt;br /&gt;FLVio integrates with a web application by means of a RESTful API.  All interaction with FLVio is behind the scenes, at the API level, so web applications keep full control over the user experience, including upload forms and video playback.  The fact that video management and delivery has been &quot;outsourced&quot; is transparent to users of the web application.  I won't go into detail about the API here, for more details you can read a &lt;a href=&quot;http://www.flvio.com/static/documents/flvio_api.pdf&quot; rel=&quot;nofollow&quot;&gt;brief technical overview here&lt;/a&gt;.  For the curious, the whole service was built with Python and is running on a farm of Solaris servers.&lt;br /&gt;&lt;br /&gt;We've got a &lt;a href=&quot;http://www.flvio.com/demo&quot; rel=&quot;nofollow&quot;&gt;simple demonstration&lt;/a&gt; of a FLVio-based application where you can upload a video and see the results of the re-encoding process.&lt;br /&gt;&lt;br /&gt;Any questions or comments, feel free to &lt;a href=&quot;http://www.flvio.com/contact&quot; rel=&quot;nofollow&quot;&gt;contact FLVio&lt;/a&gt; or myself directly.</content>
		<author>
			<name>Chris Miles</name>
			<uri>http://chrismiles.livejournal.com/</uri>
		</author>
		<source>
			<title type="html">CM | tech &amp;gt;&amp;gt; LJ</title>
			<subtitle type="html">Chris Miles</subtitle>
			<link rel="self" href="http://chrismiles.livejournal.com/data/atom"/>
			<id>urn:lj:livejournal.com:atom1:chrismiles</id>
			<updated>2012-01-20T00:22:35+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-uk">
		<title type="html">Persistent caching with fire-and-forget updates</title>
		<link href="http://www.peterbe.com/plog/persistent-caching-async"/>
		<id>http://www.peterbe.com/plog/persistent-caching-async</id>
		<updated>2011-12-13T23:00:00+00:00</updated>
		<content type="html">&lt;p&gt;I just recently landed some &lt;a href=&quot;https://github.com/peterbe/toocool/commit/1d872f05e1961c5d2cd9ee93836a056d436780fe&quot;&gt;patches on toocool&lt;/a&gt; that implements and interesting pattern that is seen more and more these days. I call it: &lt;strong&gt;Persistent caching with fire-and-forget updates&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Basically, the implementation is this: You issue a request that requires information about a Twitter user: E.g. &lt;a href=&quot;http://toocoolfor.me/following/chucknorris/vs/peterbe&quot;&gt;http://toocoolfor.me/following/chucknorris/vs/peterbe&lt;/a&gt;
The app looks into its MongoDB for information about the &lt;a href=&quot;https://github.com/peterbe/toocool/blob/master/models.py#L38&quot;&gt;tweeter&lt;/a&gt; and if it can't find this user it goes onto the Twitter REST API and looks it up and saves the result in MongoDB. 
The next time the same information is requested, and the data is available in the MongoDB it instead checks if the &lt;code&gt;modify_date&lt;/code&gt; or more than an hour and if so, it sends a job to the message queue (Celery with Redis in my case) to perform an update on this tweeter. &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/peterbe/toocool/blob/master/handlers.py#L479&quot;&gt;You can basically see the code here&lt;/a&gt; but just to reiterate and abbreviate, it looks like this:
&lt;br /&gt;&lt;div class=&quot;my_code_default&quot;&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;tweeter&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;Tweeter&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;find_one&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;p_30&quot;&gt;'username'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;})&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;not&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;tweeter&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;result&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;yield&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;tornado&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;gen&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;Task&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(...)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;tweeter&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;save_tweeter_user&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;deal&amp;nbsp;with&amp;nbsp;the&amp;nbsp;error!&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;elif&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;tweeter&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;p_30&quot;&gt;'modify_date'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;])&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_37&quot;&gt;3600&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;tasks&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;refresh_user_info&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;delay&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;...)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;render&amp;nbsp;the&amp;nbsp;template!&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;What the client gets, i.e. the user using the site, is it that apart from the very first time that URL is request is instant results but data is being maintained and refreshed.&lt;/p&gt;
&lt;p&gt;This pattern works great for data that doesn't have to be up-to-date to the second but that still needs a way to cache invalidate and re-fetch. This works because my limit of 1 hour is quite arbitrary. An alternative implementation would be something like this:
&lt;br /&gt;&lt;div class=&quot;my_code_default&quot;&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;tweeter&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;Tweeter&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;find_one&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;p_30&quot;&gt;'username'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;})&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;if&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;not&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;tweeter&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;or&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;tweeter&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;and&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;tweeter&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;)&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_37&quot;&gt;3600&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_37&quot;&gt;24&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;*&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_37&quot;&gt;7&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;):&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;re-fetch&amp;nbsp;from&amp;nbsp;Twitter&amp;nbsp;REST&amp;nbsp;API&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;elif&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;tweeter&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;)&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_37&quot;&gt;3600&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;fire-and-forget&amp;nbsp;update&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;That way you don't suffer from persistently cached data that is too old. &lt;/p&gt;</content>
		<author>
			<name>Peter Bengtsson</name>
			<uri>http://www.peterbe.com</uri>
		</author>
		<source>
			<title type="html">Peterbe.com</title>
			<subtitle type="html">Peter Bengtssons's personal homepage about little things that concern him.</subtitle>
			<link rel="self" href="http://www.peterbe.com/rss.xml?oc=Python&amp;oc=Zope"/>
			<id>http://www.peterbe.com/rss.xml?oc=Python&amp;oc=Zope</id>
			<updated>2012-02-05T00:22:11+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Competition: Working to Keep You Enslaved?</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/AaxkZs2-ycY/competition-working-to-keep-you.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-5442382439170126889</id>
		<updated>2011-12-04T15:37:06+00:00</updated>
		<content type="html">The Digital Millenium Copyright Act was never my favorite legislation. It was the first of a number of moves that threatens the freedom of the end users of intellectual property (by which under many circumstances I refer to those who have &lt;i&gt;paid good money&lt;/i&gt;&amp;nbsp;for their real or virtual goods or services) to freely enjoy that which they have purchased. Since the Python world generally prefers not to place onerous licenses on users this isn't generally an issue in my working life, but it affects other aspects of it. Those other aspects are shared with the other millions on the planet who use a smartphone.&lt;br /&gt;
&lt;br /&gt;
For all the brouhaha there's been about occupations this year (and I for one regard them as a welcome sign that Americans have realized that the future of democracy is up to them) the most insidious occupation I can think of is the one organized by wireless telephone carriers against their customers. With the aid of an application called “Carrier IQ” many handsets, supplied with software packages approved by their respective carriers, have been equipped with the provision to spy on the holder.&lt;br /&gt;
&lt;br /&gt;
This issue was brought to mind by the news that the &lt;a href=&quot;http://www.softwarefreedom.org/&quot;&gt;Software Freedom Law Center&lt;/a&gt; have &lt;a href=&quot;http://www.groklaw.net/article.php?story=20111203184859667&quot;&gt;filed paperwork with the Library of Congress&lt;/a&gt; seeking an exemption to the DMCA allowing smartphone users the full legal right to run any damned software they choose on their handsets, with or without the approval of the carrier (who is naturally in most cases the supplier of the handset).&lt;br /&gt;
&lt;br /&gt;
I’ve not&amp;nbsp;yet&amp;nbsp;heard of any case where Carrier IQ has been deployed to the detriment of the phone’s owner, but I haven't done extensive research in that area. As someone who teaches security I know that a capability, once created, is highly likely to eventually be used, and often for unintended purposes—if only by those whose approach to moral and ethical questions is one of expediency. Thank heavens so few such people exist.*&lt;br /&gt;
&lt;br /&gt;
This raised for me the broader question of why, in a society that lauds the value of competition, are wireless carriers allowed to sell ’phones that are locked to their networks? If the argument is that doing so allows them to use the profits from the handset to subsidize the contract, my answer is thanks very much, I will &lt;i&gt;pay&lt;/i&gt;&amp;nbsp;for a&amp;nbsp;handset&amp;nbsp;that I can take to another supplier if they offer better services, and you can reduce the price of my contract since you do not have to subsidize my handset purchase, thank you very much. And I want the best possible price on the&amp;nbsp;’phone, please, or I'll buy it from Mr. SmallerProfits round the corner.&lt;br /&gt;
&lt;br /&gt;
By all means let the corporate giants carry on doing business as they are, but also please require them to supply unlocked handsets on request. That way I don't have to suffer weeks in Europe where I am forced to use an international roaming plan&amp;nbsp;that charges me a minimum $100 a month &lt;i&gt;on top of my regular service charge&lt;/i&gt;&amp;nbsp;for a parsimonious 70 MB of data and something ridiculous for each few measly bits after that. Haven't they heard we live in the information age? Colleagues from other countries simply re-SIM their telephones locally and pay $30 for a card that gives them 2GB of data and 2 calling hours, topped up electronically by credit card.&lt;br /&gt;
&lt;br /&gt;
It causes me to smile sometimes when I hear Americans blindly praising their country for properties it does not possess, or for being best in the world at activities in which they are in fact well down the league table (mathematics and science education being among those activities). To my mind, America is quite admirable enough in reality without the support of false information. I chose to live here, after all. But when I discover that Israel of all countries (and no, we won’t get into that here, thank you) has made it illegal to sell locked handsets, I have to wonder how much&amp;nbsp;that particular legislative concession would&amp;nbsp;cost the cellular companies in the USA and why the move hasn't been emulated here. I am sure the lobbying costs expended against such a change would be formidable.&amp;nbsp;Times are good in the boardrooms right now.&amp;nbsp;As the UK magazine &lt;i&gt;Private Eye&lt;/i&gt;&amp;nbsp;says, “treble brandies all round”.&lt;br /&gt;
&lt;br /&gt;
So although I was delighted to see Verizon** issue a categorical statement that none of their devices have ever had Carrier IQ installed, their roaming plan sucks at least as badly as any I have come across. The fact that the charges are so much higher than those of the native carriers smells of anti-competitive practice to me. If competition is so good, why don't they all use handsets that aren't crippled?&lt;br /&gt;
&lt;br /&gt;
So rise up, sisters and brothers, and occupy your handsets. You have nothing to lose but your roaming plans.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;* For American readers, this is an irony alert. Or am I being sardonic? The real point is that some people just cannot be trusted. You know who you are.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;** The current carrier for both my voice and data cellular services&lt;/i&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-5442382439170126889?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=AaxkZs2-ycY:76vcYojToAg:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=AaxkZs2-ycY:76vcYojToAg:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=AaxkZs2-ycY:76vcYojToAg:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/AaxkZs2-ycY&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Make It Easy to Help</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/cXykSNHzgYo/make-it-easy-to-help.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-4507080866978798955</id>
		<updated>2011-12-03T19:26:43+00:00</updated>
		<content type="html">Strange things happen, and yaks get shaved in the process. I was idly exercising the PyPI JSON interface when I happened across a package called &lt;i&gt;&lt;a href=&quot;http://pypi.python.org/pypi/monk/0.2.0&quot;&gt;monk&lt;/a&gt;&lt;/i&gt;. I had no specific interest in this package, but I know something about MongoDB, and monk is an attempt to build a lightweight schema mechanism for it, with record specifications giving default values and validation rules, for example.&lt;br /&gt;
&lt;br /&gt;
I was browsing the API and I noticed a function called &lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;monk.manipulation.merged(spec, data)&lt;/b&gt;&lt;/span&gt;. It struck me (since the code deals with MongoDB records) that that function could become a method of the specification object called &lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;spec.merge_with(data)&lt;/b&gt;&lt;/span&gt;, or something similar, and that this might be an appropriate topic about which to raise an issue.&lt;br /&gt;
&lt;br /&gt;
Sadly the code repository, which is on BitBucket, won't give me access to the issue tracker, and I can't find an email address for the author, or indeed any other way to contact him. So it’s open source, just not quite as open as I'd like. And it's really not worth checking out a copy and updating the code and making a pull request—I was just reading the documentation, for Pete's sake, and wanted to help. Apparently not this time.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-4507080866978798955?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=cXykSNHzgYo:wIdp8XP9Qto:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=cXykSNHzgYo:wIdp8XP9Qto:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=cXykSNHzgYo:wIdp8XP9Qto:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/cXykSNHzgYo&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Installing ReportLab's Open Source Package on a Mac</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/kHw6YDsySqo/installing-reportlabs-open-source.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-4399361972146177908</id>
		<updated>2011-12-03T19:02:45+00:00</updated>
		<content type="html">I'm setting up to do some development, and this has meant installation work–never my favorite task, but &amp;nbsp;man's got to do what a man's go to do.&lt;br /&gt;
&lt;br /&gt;
I mostly (&lt;i&gt;i.e.&lt;/i&gt;&amp;nbsp;when it there's a recipe for it) use &lt;i&gt;&lt;a href=&quot;http://mxcl.github.com/homebrew/&quot;&gt;homebrew&lt;/a&gt;&lt;/i&gt;&amp;nbsp;to install functionality on my Mac. This isn't a religion, just my own particular choice, and by and large I'm comfortable with it.&amp;nbsp;The current homebrew recipe for Python offers an easy update to 2.7 (while retaining 2.6 as the “system” Python) and includes the distribute package. This means you can immediately run&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; easy_install virtualenvwrapper&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and fixed up your shell initialization per &lt;a href=&quot;http://www.doughellmann.com/docs/virtualenvwrapper/&quot;&gt;the installation instructions&lt;/a&gt; you are ready to go. Once I'd done that&amp;nbsp;I created a virtual environment with&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; workon test1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and installed the recent PIL fork–which I felt would be a good compatibility test–with&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; pip install pillow&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The virtual environments you create with virtualenvwrapper already have pip installed, which is neat. Next I thought I'd see whether I could just do a vanilla install of the reportlab package, which is admirably good at writing PDF files. With some delight I observed&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; pip install reportlab&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
appeared to go out to the Internet for the package, download and correctly install it. Except there was this annoying message about how it hadn't been built with freetype2 support.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;nbsp; &amp;nbsp; # installing without freetype no ttf, sorry!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;nbsp; &amp;nbsp; # You need to install a static library version of the freetype2 software&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Hmm, no problem, uninstall it again (thank you pip) and install freetype2. Except that&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; brew install freetype2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
shows me that there's no brew formula for the dratted package, and there's (what seems to be) a perfectly good freetype2 library in /usr/X11. This is kind of annoying (there must be hundreds of Mac users of ReportLab's stuff, surely?) but I downloaded the source and tweaked around with it to see if I can get it to “see” the X11 library (all the time wondering whether that's some X-dependent stuff I don't really want to tangle with). Eventually I realized it didn't matter. Without writing a brew recipe for reportlab (which is what really seems to be required—that would allow patching of setup.py—but how could we persuade Python users &lt;i&gt;not&lt;/i&gt;&amp;nbsp;to user easy_install?) I needed a freetype2 that the standard pip install could see.&lt;br /&gt;
&lt;br /&gt;
So I just had to go out in the hopeful spirit of yak-shavers everywhere and download and install freetype2 from source. Exactly what I was hoping to avoid, but I don't remember it being that difficult. I also remember blessing the author for including an “uninstall” target to try and remove it, which seems to work pretty effectively. Maybe I'll see if I can write a brew formula and submit it. Anyway, I now had a second copy of freetype2 happily occupying its own little corner of /usr/local, and that was all that was required since the standard reportlab build appears to look there for libraries.&lt;br /&gt;
&lt;br /&gt;
Which meant that pip installed the package beautifully, complete with freetype2 (and therefore TrueType font) support. Hooray!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-4399361972146177908?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=kHw6YDsySqo:g5lG1DWBf_M:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=kHw6YDsySqo:g5lG1DWBf_M:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=kHw6YDsySqo:g5lG1DWBf_M:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/kHw6YDsySqo&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-uk">
		<title type="html">Python file with closing automatically</title>
		<link href="http://www.peterbe.com/plog/python-file-with-closing-automatically"/>
		<id>http://www.peterbe.com/plog/python-file-with-closing-automatically</id>
		<updated>2011-12-02T23:30:00+00:00</updated>
		<content type="html">&lt;p&gt;Perhaps someone who knows more about the internals of python and the recent changes in 2.6 and 2.7 can explain this question that came up today in a &lt;a href=&quot;https://github.com/mozilla/bedrock/commit/4c6c41a107a29835d7e3c289af96ae0a1b649934#commitcomment-762684&quot;&gt;code review&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;I suggest using &lt;code&gt;with&lt;/code&gt; instead of &lt;code&gt;try: ... finally:&lt;/code&gt; to close a file that was written to. Instead of this:
&lt;br /&gt;&lt;div class=&quot;my_code_default&quot;&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;dest&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_38&quot;&gt;=&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_30&quot;&gt;'foo'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_30&quot;&gt;'w'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;dest&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_30&quot;&gt;'stuff'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;finally&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;dest&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;()&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_30&quot;&gt;'foo'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;()&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;will&amp;nbsp;print&amp;nbsp;'stuff'&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;We can use this:
&lt;br /&gt;&lt;div class=&quot;my_code_default&quot;&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;with&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_30&quot;&gt;'foo'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_30&quot;&gt;'w'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;)&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;as&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;dest&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;dest&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;write&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_30&quot;&gt;'stuff'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_30&quot;&gt;'foo'&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;read&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;()&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;will&amp;nbsp;print&amp;nbsp;'stuff'&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Why does that work? I'm guessing it's because the &lt;code&gt;file()&lt;/code&gt; instance object has a built in &lt;code&gt;__exit__&lt;/code&gt; method. Is that right?&lt;/p&gt;
&lt;p&gt;That means I don't need to use &lt;a href=&quot;http://docs.python.org/library/contextlib.html#contextlib.closing&quot;&gt;contextlib.closing(thing)&lt;/a&gt; right?&lt;/p&gt;
&lt;p&gt;For example, suppose you have this class:
&lt;br /&gt;&lt;div class=&quot;my_code_default&quot;&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_31&quot;&gt;Farm&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;):&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;def&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_35&quot;&gt;__enter__&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;):&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_39&quot;&gt;&quot;Entering&quot;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;self&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;def&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_35&quot;&gt;__exit__&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;err_type&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;err_val&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;err_tb&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;):&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_39&quot;&gt;&quot;Exiting&quot;&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;,&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;err_type&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;()&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;def&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_35&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;):&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_39&quot;&gt;&quot;Closing&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;with&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;Farm&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;()&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;as&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;farm&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;pass&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;this&amp;nbsp;will&amp;nbsp;print:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;Entering&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;Exiting&amp;nbsp;None&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;Closing&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Another way to achieve the same specific result would be to use the &lt;code&gt;closing()&lt;/code&gt; decrorator:
&lt;br /&gt;&lt;div class=&quot;my_code_default&quot;&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_31&quot;&gt;Farm&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;):&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;def&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_35&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;):&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;print&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_39&quot;&gt;&quot;Closing&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;contextlib&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;closing&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;with&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;closing&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;Farm&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;())&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;as&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;farm&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;pass&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;this&amp;nbsp;will&amp;nbsp;print:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;Closing&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;So the &lt;code&gt;closing()&lt;/code&gt; decorator &quot;steals&quot; the &lt;code&gt;__enter__&lt;/code&gt; and &lt;code&gt;__exit__&lt;/code&gt;. This last one can be handy if you do this:
&lt;br /&gt;&lt;div class=&quot;my_code_default&quot;&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;from&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;contextlib&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;import&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;closing&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;with&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;closing&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;p_36&quot;&gt;Farm&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;())&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;as&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;farm&lt;/span&gt;&lt;span class=&quot;p_38&quot;&gt;:&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;p_43&quot;&gt;raise&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;p_36&quot;&gt;ValueError&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;this&amp;nbsp;will&amp;nbsp;print&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;&amp;nbsp;Closing&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;&amp;nbsp;Traceback&amp;nbsp;(most&amp;nbsp;recent&amp;nbsp;call&amp;nbsp;last):&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;File&amp;nbsp;&quot;dummy.py&quot;,&amp;nbsp;line&amp;nbsp;16,&amp;nbsp;in&amp;nbsp;&amp;lt;module&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;raise&amp;nbsp;ValueError&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;span class=&quot;p_33&quot;&gt;#&amp;nbsp;&amp;nbsp;ValueError&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;This is turning into my own loud thinking and I think I get it now. &lt;code&gt;contextlib.closing()&lt;/code&gt; basically makes it possible to do what I did there with the &lt;code&gt;__enter__&lt;/code&gt; and &lt;code&gt;__exit__&lt;/code&gt; and it seems the &lt;code&gt;file()&lt;/code&gt; built-in has a exit handler that takes care of the closing already so you don't have to do it with any extra decorators. &lt;/p&gt;</content>
		<author>
			<name>Peter Bengtsson</name>
			<uri>http://www.peterbe.com</uri>
		</author>
		<source>
			<title type="html">Peterbe.com</title>
			<subtitle type="html">Peter Bengtssons's personal homepage about little things that concern him.</subtitle>
			<link rel="self" href="http://www.peterbe.com/rss.xml?oc=Python&amp;oc=Zope"/>
			<id>http://www.peterbe.com/rss.xml?oc=Python&amp;oc=Zope</id>
			<updated>2012-02-05T00:22:11+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Boggle at the London Python Dojo</title>
		<link href="http://ramblings.timgolden.me.uk/2011/12/02/boggle-at-the-london-python-dojo/"/>
		<id>http://ramblings.timgolden.me.uk/2011/12/02/boggle-at-the-london-python-dojo/</id>
		<updated>2011-12-02T13:55:18+00:00</updated>
		<content type="html">&lt;p&gt;(Yes, that is a deliberately ambiguous title offering two possible interpretations: as a description of what the programming challenge was at last night&amp;#8217;s Dojo; or as an imperative to be awed at the might and wonder that is the London Python Dojo. You choose).&lt;/p&gt;
&lt;p&gt;Last night was the first time I&amp;#8217;ve actually run the London Dojo. For the two and more years since its inception, Nicholas Tollervey (&lt;a href=&quot;http://twitter.com/ntoll&quot;&gt;@ntoll&lt;/a&gt; to his Twitter friends &amp;#038; acquaintances) has indefatigably turned up every first Thursday to clear up the Fry-IT offices, order the pizza, buy the beer, put up signs, leave out sticky labels, request free books from O&amp;#8217;Reilly and then drum up support, keep everyone happy and actually run the show, finishing off by organising everyone to clear up, move chairs, dump the rubbish outside, and finally catch the last train home to Sticksville, Northants. where his wife and children have long ago fallen asleep over their sheet music, having gone da Capo al Segno one time too many waiting for him to return home.&lt;/p&gt;
&lt;p&gt;A few months ago, Nicholas asked for volunteers to help out, and a small group of us got together to share the burden. Since then, &lt;a href=&quot;http://twitter.com/otfrom&quot;&gt;Bruce&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/tartley&quot;&gt;Jonathan&lt;/a&gt;, &lt;a href=&quot;http://twitter.com/tomviner&quot;&gt;Tom&lt;/a&gt; and finally &lt;a href=&quot;http://twitter.com/tjguk&quot;&gt;I&lt;/a&gt; have taken a turn at organising. And of course it&amp;#8217;s not until you have to do it yourself that you realise how much work is involved&amp;#8230; I was fortunate because Gautier (who actually works there) and Nicholas himself were both at Fry-IT for the day and were able to do some of the less proximate preparation, including ordering a dozen pizzas and buying three dozen bottles of beer. I was able to make a small contribution in the shape of a pack of sticky labels.&lt;/p&gt;
&lt;p&gt;The Dojo itself was very slightly quieter than usual: just under 20 rather than just under 30. That&amp;#8217;s not a bad thing in Fry&amp;#8217;s offices which are not huge. There was a bit of an introduce-yourself session (which was made even more primary-school-like by the presence of big sticky labels on everyone&amp;#8217;s chest with their names or cognomens). And then we had a lightning talk from Martin who has a sort of &lt;a href=&quot;http://amon.cx/&quot;&gt;cut-down Nagios for app developers&lt;/a&gt;. (I hope I haven&amp;#8217;t done it an injustice). And then a surprisingly straightforward vote on the evening&amp;#8217;s programming challenge which gave us&amp;#8230; Boggle. (Word game; 8&amp;#215;8 grid of random letters; form words by moving like a chess king).&lt;/p&gt;
&lt;p&gt;Four teams; four solutions, all more or less different. Only one team ended up with a working solution at the end of 90 minutes (and they appeared to be optimising by removing all vertical whitespace; or maybe that was an aesthetic choice - who knows?). Our team had visible activity (which is more than Team 1 managed!) but no solution. It&amp;#8217;s up to each team how they want to manage their collaboration. We&amp;#8217;d gone for the split-team approach, dividing the problem into its eminently decoupled parts: a mechanism to read in a dictionary of words and provide efficient searchability (using a Trie, in case you&amp;#8217;re interested); and a structure to hold the board (a dictionary, keyed on coordinates), generate the letters into the grid, and search for all possible words, relying on the dictionary code to indicate success, failure, partial success, or success with more possibilities.&lt;/p&gt;
&lt;p&gt;The tweets were still flying this morning as people tried to tweak their solution (or, indeed, get it to work at all) on the train, on their phone or at home overnight. A friend of mine who&amp;#8217;s a C++ coder came along mainly because I&amp;#8217;d talked so much about the Dojo. He&amp;#8217;s not really into Python - in fact he&amp;#8217;s not really a programmer: he does medical image analysis. But he enjoyed the atmosphere and made a few small suggestions before simply sitting back and watching the teams get to work.&lt;/p&gt;
&lt;p&gt;Look out for the next Dojo at the beginning of January. It&amp;#8217;ll be announced on the python-uk mailing list and we&amp;#8217;ll tweet about it when we&amp;#8217;ve fixed a date.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;UPDATE&lt;/b&gt; Dirk&amp;#8217;s added a blog post of his own:&lt;br /&gt;
&lt;a href=&quot;http://elazungu.wordpress.com/2011/12/02/solving-boggle-with-python/&quot;&gt;http://elazungu.wordpress.com/2011/12/02/solving-boggle-with-python/&lt;/a&gt;&lt;/p&gt;</content>
		<author>
			<name>Tim Golden</name>
			<uri>http://ramblings.timgolden.me.uk</uri>
		</author>
		<source>
			<title type="html">Moderate Realism » Tech</title>
			<subtitle type="html">The ramblings of Tim Golden</subtitle>
			<link rel="self" href="http://ramblings.timgolden.me.uk/category/tech/feed"/>
			<id>http://ramblings.timgolden.me.uk/category/tech/feed</id>
			<updated>2012-02-03T12:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Harking Back</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/-3W2CgydbUc/harking-back.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-7013080867095278261</id>
		<updated>2011-11-29T04:15:43+00:00</updated>
		<content type="html">&lt;br /&gt;
After my recent spate of “you can do mathematics in your blog” posts (&lt;i&gt;I&lt;/i&gt;&amp;nbsp;am no mathematician, but I do know computers) I remembered that some time ago I &lt;a href=&quot;http://holdenweb.blogspot.com/2007/08/close-enough.html&quot;&gt;did a post&lt;/a&gt; about &lt;i&gt;Euler's identity&lt;/i&gt;, and at the time the best I could do was a graphic with the equation in it. I reproduce the graphic in large format below, to demonstrate how clearly unsatisfactory the graphic truly was at higher resolution (you may notice that at this size the pixellation of the font has become clearly visible, though some browsers make valiant efforts to disguise it):&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/_JT1n2tt-4Wg/RsUq9gsXv6I/AAAAAAAAACU/qbNnKBATibY/s400/euler.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;146&quot; src=&quot;http://1.bp.blogspot.com/_JT1n2tt-4Wg/RsUq9gsXv6I/AAAAAAAAACU/qbNnKBATibY/s400/euler.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Of course I could have taken more care, and produced a higher-resolution graphic, but the fact remains that ultimately this representation cannot be copied and pasted as part of another expression, because the bitmap representation is completely unrelated to the structure of the equation. And eventually, no matter how high the resolution at which you generate, someone will come up with an application that demands more resolution. More of everything cheaper is kind of a clarion call in the computing world, and by and large the engineers have done their best to deliver.&lt;br /&gt;
&lt;br /&gt;
Now, though, with the magic of TeX at my blogging fingertips, I can display the same equation (or at least the same identity: most people seem to prefer the zero identity as the canonical form, but I am persisting in my original bloody-minded mistake for backwards compatibility reasons) with ease using the TeX formula &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;\(e^{\pi i} = -1\)&lt;/pre&gt;&lt;br /&gt;
which renders (using standard font sizes) as:&lt;br /&gt;
\[&lt;br /&gt;
e^{\pi i} = -1&lt;br /&gt;
\]&lt;br /&gt;
Thanks to MathJax, when I blow the TeX formula up it renders without the unpleasant pixellation effects of my previous attempt:&lt;br /&gt;
&lt;div&gt;\[&lt;br /&gt;
e^{\pi i} = -1&lt;br /&gt;
\]&lt;/div&gt;&lt;br /&gt;
To me this is clearly an improvement over my original method (though I must confess that I cannot remember at this distance how I produced the graphic for the original blog entry).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Access to TeX Source&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you hover the cursor over the &lt;i&gt;MathJax&lt;/i&gt; equation you will get a context menu from it (Windows and Ubuntu users use your right mouse button, recent Mac users use a two-finger click) and ask to see the equation source code using the &lt;i&gt;Show Source&lt;/i&gt;&amp;nbsp;option:&lt;br /&gt;
&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-7DG2nsnN9KI/TtIbqPBq-NI/AAAAAAAAAw8/igRRjFqLzx4/s1600/MathJaxMainMenu.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;149&quot; src=&quot;http://2.bp.blogspot.com/-7DG2nsnN9KI/TtIbqPBq-NI/AAAAAAAAAw8/igRRjFqLzx4/s320/MathJaxMainMenu.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;The first time I used this feature it was in TeX mode, and what I saw was the TeX code I used to create the expression. &amp;nbsp;On my Mac that window looked like this:&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-YYI9SBGLxjY/TtKmK0PRcKI/AAAAAAAAAxc/URLqK7tJUxk/s1600/MathJaxSourceTex.png&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-YYI9SBGLxjY/TtKmK0PRcKI/AAAAAAAAAxc/URLqK7tJUxk/s1600/MathJaxSourceTex.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;So now your mathematics can be copied by others, for example to paste into their own blogs or other papers.&amp;nbsp;&lt;i&gt;People can now copy and paste mathematics freely&lt;/i&gt;. I think that's exciting news!&amp;nbsp;Of course you can also repay the favor by copying TeX source from other blogs (as well as the many excellent TeX web papers and articles) into your own blogs.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;MathML Too&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If, like me, you are an inveterate tinkerer then you might wonder whether it's worth learning MathML. If you already know TeX then it would appear that the answer is “no,” because &lt;i&gt;MathJax&lt;/i&gt;&amp;nbsp;can translate between TeX and MathML format for you. If you want to see the mathML equivalent you first have to change &lt;i&gt;MathJax&lt;/i&gt;'s display format. This is again just a matter of using the &lt;i&gt;MathJax&lt;/i&gt;&amp;nbsp;context menu:&lt;br /&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-igQMsGY4rtk/TtIbz7rHzYI/AAAAAAAAAxE/bcMig8MePZI/s1600/MathJaxFormatChoice.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;164&quot; src=&quot;http://1.bp.blogspot.com/-igQMsGY4rtk/TtIbz7rHzYI/AAAAAAAAAxE/bcMig8MePZI/s400/MathJaxFormatChoice.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
If you repeat your request to see the equation source you will now see the MathML equivalent to the TeX source I wrote in the first place. This neatly gives you the answer to your question “is mathML representation much more long-winded than TeX markup,” to which the answer is &lt;i&gt;“yes, and then some”&lt;/i&gt;&amp;nbsp;but you don't need to worry about that. Just be happy that &lt;i&gt;MathJax&lt;/i&gt;&amp;nbsp;can take care of them both:&lt;br /&gt;
&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-dMaYxMNGDlc/TtKm_xqqw7I/AAAAAAAAAxk/lv9xUjmqgzk/s1600/MathJaxMathML.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;118&quot; src=&quot;http://4.bp.blogspot.com/-dMaYxMNGDlc/TtKm_xqqw7I/AAAAAAAAAxk/lv9xUjmqgzk/s320/MathJaxMathML.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I know it is equally possible to author for MathJax in MathML, so I would assume (but have not verified) that translation to TeX would similarly be possible. You'll have to switch back to TeX mode to start seeing TeX sources again, by the way.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Experiment&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Someone wanted to know if superscripts can have superscripts. The answer, naturally, is yes. You can use the context menu to examine the source.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;\(e^{{\pi i}^{\pi i}}\)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
How did that work for you? Welcome to the world of copy and paste mathematics!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-7013080867095278261?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=-3W2CgydbUc:_q4stAUmBWM:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=-3W2CgydbUc:_q4stAUmBWM:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=-3W2CgydbUc:_q4stAUmBWM:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/-3W2CgydbUc&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Blogging Mathematics</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/o4-Dv2yy0WA/blogging-mathematics.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-6938724924931232924</id>
		<updated>2011-11-27T15:06:15+00:00</updated>
		<content type="html">I just wanted to see if I could get some simple mathematics into this blog. Not so much for my own needs, but because my brother (who is a far better mathematician than I am, but rather less adventurous when it comes to using computers) has been wanting to do so for a while, but hasn't been able to find a suitable system.&lt;br /&gt;
&lt;br /&gt;
If you want to&amp;nbsp;&lt;i&gt;write&lt;/i&gt;&amp;nbsp;about mathematics you need some way to describe the formulae, as the “mathematical keyboard” does not yet appear to have been invented.&amp;nbsp;The most commonly-used mathematical typesetting system is probably Donald Knuth's&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/TeX&quot;&gt;T&lt;span class=&quot;Apple-style-span&quot;&gt;E&lt;/span&gt;X&lt;/a&gt;, which provides a very versatile language for describing mathematical expressions&amp;nbsp;in relatively plain text.&amp;nbsp;I started my search on the assumption that there has to be&amp;nbsp;&lt;i&gt;some&lt;/i&gt;&amp;nbsp;way of integrating&amp;nbsp;T&lt;span class=&quot;Apple-style-span&quot;&gt;E&lt;/span&gt;X with the popular Blogger platform that I and many others use. There are other languages for describing mathematics, including a markup (HTML-like) language called MathML, and this solution can be adapted (by reading applications documentation) to handle some others.&lt;br /&gt;
&lt;br /&gt;
Ideally the author should just be able to type&amp;nbsp;T&lt;span class=&quot;Apple-style-span&quot;&gt;E&lt;/span&gt;X-style input and have wonderful formulae appear automatically. In other words when you want to talk about the probability of getting \(k\) heads when flipping \(n\) coins you should be able to write&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;\[P(E) = {n \choose k} p^k (1-p)^{n-k}\]&lt;/pre&gt;&lt;br /&gt;
and have it appear as&lt;br /&gt;
&lt;br /&gt;
\[P(E) = {n \choose k} p^k (1-p)^{n-k}\]&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;(EDIT: Formula corrected Nov 25, 2011)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Note that the \(k\) and \(n\) in the paragraph above the formula, as well as those in this one, are properly represented in mathematical notation, and therefore identifiable as mathematical symbols, because they are so flagged in the body of the text—you can write simple or complex formulae inline as well as in separate expressions like the one above. I achieved this result using the &lt;i&gt;&lt;a href=&quot;http://mathjax.org/&quot;&gt;MathJax&lt;/a&gt;&lt;/i&gt; system, which uses Javascript to render complex mathematics in the browser. The really nice part is that there's nothing to install, because&amp;nbsp;&lt;i&gt;&lt;a href=&quot;http://mathjax.org/&quot;&gt;MathJax&lt;/a&gt;&lt;/i&gt;&amp;nbsp;is downloaded by the reader's browser.&amp;nbsp;I'd welcome similar instructions for other blogging platforms in the comments if readers want to help users of those other platforms.&lt;br /&gt;
&lt;br /&gt;
I realize that these instructions are detailed and therefore somewhat tedious, but I wanted them to be as useful and as simple as possible.&amp;nbsp;Unfortunately the authors of &lt;i&gt;MathJax&lt;/i&gt;&amp;nbsp;make a very common mistake of software authors - they assume that their readers know enough to already understand how &lt;i&gt;MathJax&lt;/i&gt;&amp;nbsp;is&amp;nbsp;used on the web. The people who &lt;i&gt;really&lt;/i&gt;&amp;nbsp;need to know this stuff are working mathematicians, scientists and engineers. While they are often as smart as all get-up they mostly don't have the time to develop great insight into web technologies, and I am hoping this proves they don't need to.&lt;br /&gt;
&lt;br /&gt;
As usual, however, the assumption is that users will be happy to pick up whatever skills they need to get the job done.&amp;nbsp;The &lt;i&gt;MathJax&lt;/i&gt; site has examples in it, but nothing that really shows you exactly how to get that mathematics into your pages. I hope to provide those missing steps here. Please note, however, that &lt;i&gt;I know very little about TEX, and cannot help you to find representations for specific formulae&lt;/i&gt;. As a working computer scientist I often have to learn enough about a “foreign” system to be able to demonstrate a concept. This blog post is intended to provide no more than a simple proof-of-concept, and I will not be responsible for any limitations of or problems with&amp;nbsp;&lt;i&gt;MathJax&lt;/i&gt;, Blogger or these instructions.&lt;br /&gt;
&lt;br /&gt;
The first thing to do is to make sure your post includes a couple of pieces of information. You have to insert configuration data for &lt;i&gt;MathJax&lt;/i&gt;&amp;nbsp;(there are various options you can explore once you understand its principles). You must also include a request to load the actual code of &lt;i&gt;MathJax&lt;/i&gt;, which is conveniently stored at multiple locations on the internet under a single name—a “content delivery network” determines your closest location and sends the code from there.&lt;br /&gt;
&lt;br /&gt;
There are two different ways to inject this code. The simpler way, which I have used for this post and describe here, inserts these instructions in each individual post. If you want mathematics in every post then you should consider moving the configuration data and code request into your blog template, so you do not need to repeat the insertion for each post. This more advanced method is beyond the scope of this article, but I mention it for those bloggers who know enough to be able to use it.&lt;br /&gt;
&lt;br /&gt;
So, create a new post for your blog, and then switch to the HTML input mode. Copy the text from the area immediately below and paste it in&amp;nbsp;&lt;i&gt;at the start of your HTML input window:&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;textarea cols=&quot;70&quot; name=&quot;textarea&quot;&gt;&amp;lt;script type=&quot;text/x-mathjax-config&quot;&amp;gt;   MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); &amp;lt;/script&amp;gt; &amp;lt;script src=&quot;http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML&quot; type=&quot;text/javascript&quot;&amp;gt; &amp;lt;/script&amp;gt;&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
(You might want to follow the final &quot;&amp;gt;&quot; with an x that you use to set the cursor after the code, which should begin the post). Then go back into standard compose mode and, as an example, enter the following text:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;A Cross Product Formula

\[\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix}
\mathbf{i} &amp;amp; \mathbf{j} &amp;amp; \mathbf{k} \\
\frac{\partial X}{\partial u} &amp;amp;  \frac{\partial Y}{\partial u} &amp;amp; 0 \\
\frac{\partial X}{\partial v} &amp;amp;  \frac{\partial Y}{\partial v} &amp;amp; 0
\end{vmatrix}  \]
&lt;/span&gt;&lt;/pre&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Hopefully, if all has gone well, you can now see this when you preview your blog page:&lt;br /&gt;
&lt;br /&gt;
A Cross Product Formula&lt;br /&gt;
&lt;br /&gt;
\[\mathbf{V}_1 \times \mathbf{V}_2 = &amp;nbsp;\begin{vmatrix}&lt;br /&gt;
\mathbf{i} &amp;amp; \mathbf{j} &amp;amp; \mathbf{k} \\&lt;br /&gt;
\frac{\partial X}{\partial u} &amp;amp; &amp;nbsp;\frac{\partial Y}{\partial u} &amp;amp; 0 \\&lt;br /&gt;
\frac{\partial X}{\partial v} &amp;amp; &amp;nbsp;\frac{\partial Y}{\partial v} &amp;amp; 0&lt;br /&gt;
\end{vmatrix} &amp;nbsp;\]&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;As I believe I mentioned, this is largely a proof-of-concept post. I can't imagine why the &lt;i&gt;MathJax&lt;/i&gt;&amp;nbsp;guys haven't published this already. It's possible they already have an application note about about this, but if not then they are free to link to this article to help their users (hello, &lt;i&gt;MathJax&lt;/i&gt;&amp;nbsp;users).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;So there you have it.&amp;nbsp;This could make it much easier to talk about mathematics on the web.&amp;nbsp;Please let me know if anything isn't clear, and I will try to correct it until it is. Otherwise, just have fun blogging mathematics!&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-6938724924931232924?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=o4-Dv2yy0WA:rK0_kDh7GI0:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=o4-Dv2yy0WA:rK0_kDh7GI0:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=o4-Dv2yy0WA:rK0_kDh7GI0:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/o4-Dv2yy0WA&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Just Testing Mathematics Setting with MathJax</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/eLn_cSvH2ZI/just-testing.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-1133573129540563681</id>
		<updated>2011-11-27T05:57:49+00:00</updated>
		<content type="html">&lt;br /&gt;
I decided it would be a good idea to test out the instructions from &lt;a href=&quot;http://holdenweb.blogspot.com/2011/11/blogging-mathematics.html&quot;&gt;my last post&lt;/a&gt;, where I explain how to put mathematics in your blog. This is fast becoming addictive, so I am going to have to sit on my hands for a while after this post.&lt;br /&gt;
&lt;br /&gt;
A Cross Product Formula&lt;br /&gt;
&lt;br /&gt;
\[\mathbf{V}_1 \times \mathbf{V}_2 = &amp;nbsp;\begin{vmatrix}&lt;br /&gt;
\mathbf{i} &amp;amp; \mathbf{j} &amp;amp; \mathbf{k} \\&lt;br /&gt;
\frac{\partial X}{\partial u} &amp;amp; &amp;nbsp;\frac{\partial Y}{\partial u} &amp;amp; 0 \\&lt;br /&gt;
\frac{\partial X}{\partial v} &amp;amp; &amp;nbsp;\frac{\partial Y}{\partial v} &amp;amp; 0&lt;br /&gt;
\end{vmatrix} &amp;nbsp;\]&lt;br /&gt;
&lt;div&gt;That seemed to work, but I did notice a couple of glitches.&amp;nbsp;So here are a few hints.&lt;/div&gt;&lt;ol&gt;&lt;li&gt;After you paste in the HTML, consider typing a couple of characters (&quot;xx&quot; or similar) as a placemarker so that you can be sure where your blog text is being inserted in relation to&amp;nbsp;the script calls (the scripts should be &lt;i&gt;right at the start&lt;/i&gt;). It's usually a good idea to lay down a marker like this when switching between “compose” and “HTML” editing modes.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;If you want to put a formula in-line just write it with a dollar sign before and after. So&lt;br /&gt;
&lt;code&gt;and therefore $x^2$ cannot be zero&lt;/code&gt;&lt;br /&gt;
will come out as:&lt;br /&gt;
&lt;i&gt; and therefore $x^2$ cannot be zero&lt;/i&gt; &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;When TeX inputs are copied from the web, to avoid formatting confusion it is often better to either paste into the HTML edit mode, or paste into a text window and re-copy to lose the formatting before pasting into the compose edit mode.&lt;/li&gt;
&lt;li&gt;If at first you don't succeed, look for help among the TeX community. It is large, and many of its members are professional educators.&lt;/li&gt;
&lt;/ol&gt;Just to test the application a little more throughly here are a few random examples lifted from the web. Did I mention I love the web?&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;math-caption&quot;&gt;Simple equations&lt;/div&gt;\begin{equation}\label{eq1}&lt;br /&gt;
\sum_{i=0}^{i=10} \phi_i(3)&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
\begin{equation}\label{eq2}&lt;br /&gt;
\int_{0}^{10} \phi_i(x)dx = 3&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;math-caption&quot;&gt;\[&lt;br /&gt;
z \left( 1 \ +\ \sqrt{\omega_{i+1} + \zeta -\frac{x+1}{\Theta +1} y + 1}&lt;br /&gt;
\ \right)&lt;br /&gt;
\ \ \ =\ \ \ 1&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
Multi-line equation&lt;br /&gt;
&lt;br /&gt;
\[&lt;br /&gt;
\begin{align} &lt;br /&gt;
(a+b)^3 &amp;amp;= (a+b)^2(a+b)\\&lt;br /&gt;
&amp;amp;=(a^2+2ab+b^2)(a+b)\\&lt;br /&gt;
&amp;amp;=(a^3+2a^2b+ab^2) + (a^2b+2ab^2+b^3)\\&lt;br /&gt;
&amp;amp;=a^3+3a^2b+3ab^2+b^3&lt;br /&gt;
\end{align}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
The derivative is defined as&lt;br /&gt;
&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{\Delta y}&lt;br /&gt;
{\Delta x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
f(x) \to y \quad \mbox{as} \quad x \to&lt;br /&gt;
x_{0}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
f(x) \mathop {\longrightarrow}&lt;br /&gt;
\limits_{x \to x_0} y&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
Math with font-size set to 250%&lt;/div&gt;&lt;div&gt;\[&lt;br /&gt;
g\frac{d^2u}{dx^2} + L\sin u = 0&lt;br /&gt;
\]&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;While my testing can hardly be called exhaustive, I think I have provided as good a start as anyone could expect in the world of mathematical blogging. Good luck with yours!&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-1133573129540563681?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=eLn_cSvH2ZI:4q1imLM44bY:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=eLn_cSvH2ZI:4q1imLM44bY:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=eLn_cSvH2ZI:4q1imLM44bY:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/eLn_cSvH2ZI&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Source for “Testing Mathematics” Piece</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/HRYpNXmycts/source-for-testing-mathematics-piece.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-7112557696378450268</id>
		<updated>2011-11-25T18:59:51+00:00</updated>
		<content type="html">So to complete a fast trilogy of mathematical typesetting here, I realized that while the last post might have looked very pretty it might be frustrating to readers who wanted to see the TeX source for the examples.&lt;br /&gt;
&lt;br /&gt;
So here is a pasted copy of the contents of the compose edit window, to give you access to the TeX. Note that even this does not reveal quite all the secrets, since certain quotings and the scalable fonts are implemented in the HTML editor window. But it will at least help to explain why the post looks the way it does.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt; &lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt; I decided it would be a good idea to test out the instructions from my last post, where I explain how to put mathematics in your blog. This is fast becoming addictive, so I am going to have to sit on my hands for a while after this post.&lt;br /&gt;
&lt;br /&gt;
A Cross Product Formula&lt;br /&gt;
&lt;br /&gt;
\[\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix}&lt;br /&gt;
\mathbf{i} &amp;amp; \mathbf{j} &amp;amp; \mathbf{k} \\&lt;br /&gt;
\frac{\partial X}{\partial u} &amp;amp;  \frac{\partial Y}{\partial u} &amp;amp; 0 \\&lt;br /&gt;
\frac{\partial X}{\partial v} &amp;amp;  \frac{\partial Y}{\partial v} &amp;amp; 0&lt;br /&gt;
\end{vmatrix}  \]&lt;br /&gt;
That seemed to work, but I did notice a couple of glitches. So here are a few hints.&lt;br /&gt;
After you paste in the HTML, consider typing a couple of characters (&quot;xx&quot; or similar) as a placemarker so that you can be sure where your blog text is being inserted in relation to the script calls (the scripts should be right at the start). It's usually a good idea to lay down a marker like this when switching between “compose” and “HTML” editing modes.&lt;br /&gt;
If you want to put a formue just write it with a dollar sign before and after. So&lt;br /&gt;
and therefore $x^2$ cannot be zero&lt;br /&gt;
will come out as:&lt;br /&gt;
and therefore $x^2$ cannot be zero &lt;br /&gt;
When TeX inputs are copied from the web, to avoid formatting confusion it is often better to either paste into the HTML edit mode, or paste into a text window and re-copy to lose the formatting before pasting into the compose edit mode.&lt;br /&gt;
If at first you don't succeed, look for help among the TeX community. It is large, and many of its members are professional educators.&lt;br /&gt;
Just to test the application a little more throughly here are a few random examples lifted from the web. Did I mention I love the web?&lt;br /&gt;
&lt;br /&gt;
Simple equations&lt;br /&gt;
\begin{equation}\label{eq1}&lt;br /&gt;
\sum_{i=0}^{i=10} \phi_i(3)&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
\begin{equation}\label{eq2}&lt;br /&gt;
\int_{0}^{10} \phi_i(x)dx = 3&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
\[&lt;br /&gt;
z \left( 1 \ +\ \sqrt{\omega_{i+1} + \zeta -\frac{x+1}{\Theta +1} y + 1}&lt;br /&gt;
\ \right)&lt;br /&gt;
\ \ \ =\ \ \ 1&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
Multi-line equation&lt;br /&gt;
&lt;br /&gt;
\[&lt;br /&gt;
\begin{align}&lt;br /&gt;
(a+b)^3 &amp;amp;= (a+b)^2(a+b)\\&lt;br /&gt;
&amp;amp;=(a^2+2ab+b^2)(a+b)\\&lt;br /&gt;
&amp;amp;=(a^3+2a^2b+ab^2) + (a^2b+2ab^2+b^3)\\&lt;br /&gt;
&amp;amp;=a^3+3a^2b+3ab^2+b^3&lt;br /&gt;
\end{align}&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
The derivative is defined as&lt;br /&gt;
&lt;br /&gt;
\begin{equation}&lt;br /&gt;
\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{\Delta y}&lt;br /&gt;
{\Delta x}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
f(x) \to y \quad \mbox{as} \quad x \to&lt;br /&gt;
x_{0}&lt;br /&gt;
\end{equation}&lt;br /&gt;
\begin{equation}&lt;br /&gt;
f(x) \mathop {\longrightarrow}&lt;br /&gt;
\limits_{x \to x_0} y&lt;br /&gt;
\end{equation}&lt;br /&gt;
&lt;br /&gt;
Math with font-size set to 250%&lt;br /&gt;
\[&lt;br /&gt;
g\frac{d^2u}{dx^2} + L\sin u = 0&lt;br /&gt;
\]&lt;br /&gt;
&lt;br /&gt;
While my testing can hardly be called exhaustive, I think I have provided as good a start as anyone could expect in the world of mathematical blogging. Good luck with yours!&lt;/span&gt;&lt;br /&gt;
&lt;/code&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-7112557696378450268?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=HRYpNXmycts:w4gdFhAL_xw:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=HRYpNXmycts:w4gdFhAL_xw:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=HRYpNXmycts:w4gdFhAL_xw:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/HRYpNXmycts&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">CherryPy and byte range requests? Too easy.</title>
		<link href="http://chrismiles.livejournal.com/24307.html"/>
		<id>urn:lj:livejournal.com:atom1:chrismiles:24307</id>
		<updated>2011-11-20T22:44:31+00:00</updated>
		<content type="html">One of my web applications is a CherryPy server that serves large files.  I wanted to enable &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html&quot; rel=&quot;nofollow&quot;&gt;HTTP 1.1 byte range&lt;/a&gt; requests so I expected to have to get my hands dirty modifying my app to look for the right headers and do the dirty work.&lt;br /&gt;&lt;br /&gt;Not so!  I was already taking advantage of CherryPy's built-in helper function serveFile (cherrypy.lib.cptools.serveFile in CP 2) to efficiently serve static files back to the client.  Glancing at the &lt;a href=&quot;http://trac.cherrypy.org/browser/branches/cherrypy-2.x/cherrypy/lib/cptools.py#L242&quot; rel=&quot;nofollow&quot;&gt;code for serveFile revealed&lt;/a&gt; that support for HTTP 1.1 byte ranges was already supported.  But why were HTTP 1.1 range requests being ignored by my app?&lt;br /&gt;&lt;br /&gt;The answer was simply that I had to tell CherryPy to enable HTTP 1.1 features.  A quick change to the application config file to add:&lt;br /&gt;&lt;pre&gt;
server.protocol_version = &quot;HTTP/1.1&quot;&lt;/pre&gt;&lt;br /&gt;and a restart and success!&lt;br /&gt;&lt;pre&gt;
$ telnet media.serve.flvio.com 80
Trying 82.118.75.220...
Connected to media.serve.flvio.com.
Escape character is '^]'.
GET /media/mediakit/thumb/moovoob/2.jpg HTTP/1.1
host:media.serve.flvio.com
Range: bytes=10-20

HTTP/1.1 206 Partial Content
Date: Thu, 03 Jul 2008 10:10:15 GMT
Server: CherryPy/2.3.0
Accept-Ranges: bytes
Content-Length: 11
Content-Range: bytes 10-20/12438
Content-Type: image/jpeg
Last-Modified: Wed, 02 Jul 2008 05:47:28 GMT

51.57.1^]
telnet&amp;gt; cl
Connection closed.&lt;/pre&gt;</content>
		<author>
			<name>Chris Miles</name>
			<uri>http://chrismiles.livejournal.com/</uri>
		</author>
		<source>
			<title type="html">CM | tech &amp;gt;&amp;gt; LJ</title>
			<subtitle type="html">Chris Miles</subtitle>
			<link rel="self" href="http://chrismiles.livejournal.com/data/atom"/>
			<id>urn:lj:livejournal.com:atom1:chrismiles</id>
			<updated>2012-01-20T00:22:35+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-uk">
		<title type="html">Trivial but powerful tips for nosetests</title>
		<link href="http://www.peterbe.com/plog/trivial-but-powerful-tips-for-nosetests"/>
		<id>http://www.peterbe.com/plog/trivial-but-powerful-tips-for-nosetests</id>
		<updated>2011-11-18T21:00:00+00:00</updated>
		<content type="html">&lt;p&gt;I'm clearly still a &lt;a href=&quot;http://readthedocs.org/docs/nose/en/latest/&quot;&gt;nosetests&lt;/a&gt; beginner because it was only today that I figured out how to set certain plugins to always be on.&lt;/p&gt;
&lt;p&gt;First of all you might like these plugins too:
&lt;pre&gt;
 $ pip install rudolf
 $ pip install disabledoc
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;Docs: &lt;a href=&quot;http://pypi.python.org/pypi/rudolf/&quot;&gt;rudolf&lt;/a&gt; and &lt;a href=&quot;https://github.com/kumar303/disable-docstring&quot;&gt;disabledoc&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To get these gorgeous little tricks into every run of &lt;code&gt;nosetests&lt;/code&gt; edit the file &lt;code&gt;~/.noserc&lt;/code&gt; and add the following:
&lt;pre&gt;
 [nosetests]
 with-disable-docstring=1
 with-color=1
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;That should make your life a little easier. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I've since managed to shoot myself in both legs with messing around with nosetests plugins because I heavily rely on &lt;a href=&quot;https://github.com/jbalogh/django-nose&quot;&gt;django-nose&lt;/a&gt; in Django. Long story short: be careful if you get strange import related errors!&lt;/p&gt;</content>
		<author>
			<name>Peter Bengtsson</name>
			<uri>http://www.peterbe.com</uri>
		</author>
		<source>
			<title type="html">Peterbe.com</title>
			<subtitle type="html">Peter Bengtssons's personal homepage about little things that concern him.</subtitle>
			<link rel="self" href="http://www.peterbe.com/rss.xml?oc=Python&amp;oc=Zope"/>
			<id>http://www.peterbe.com/rss.xml?oc=Python&amp;oc=Zope</id>
			<updated>2012-02-05T00:22:11+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">IMAPClient 0.8 released</title>
		<link href="http://freshfoo.com/blog/IMAPClient-0.8"/>
		<id>http://freshfoo.com/blog/2011/11/09/IMAPClient-0.8</id>
		<updated>2011-11-09T22:10:00+00:00</updated>
		<content type="html">&lt;p&gt;Version 0.8 of IMAPClient is out! Although I didn't get everything
into this release that I had hoped to, there's still plenty
there. Thanks to Johannes Heckel and Andrew Scheller for their
contributions to this release.&lt;/p&gt;
&lt;p&gt;Highlights for 0.8:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;OAUTH authentication support&lt;/li&gt;
&lt;li&gt;IDLE support (&lt;a class=&quot;reference external&quot; href=&quot;http://imapclient.freshfoo.com/browser/imapclient/examples/idle_example.py&quot;&gt;example&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Full NOOP support&lt;/li&gt;
&lt;li&gt;Comprehensive Sphinx based docs. A HTML version of the docs is
included in the source distribution. They are also hosted online at
&lt;a class=&quot;reference external&quot; href=&quot;http://imapclient.readthedocs.org/&quot;&gt;http://imapclient.readthedocs.org/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Folder rename support&lt;/li&gt;
&lt;li&gt;New &amp;quot;debug&amp;quot; property to simplify protocol debugging&lt;/li&gt;
&lt;li&gt;Live test and interactive shell features are now part of the imapclient Python
package and can be called from the command-line. (For example:
&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;python&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;imapclient.interact&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;...&lt;/span&gt;&lt;/tt&gt;)&lt;/li&gt;
&lt;li&gt;New normalise_times attribute allows caller to select whether
datetimes returned by fetch() are native or not&lt;/li&gt;
&lt;li&gt;interactive shell now works with both IPython 0.10 and 0.11 (and
later)&lt;/li&gt;
&lt;li&gt;BODY/BODYSTRUCTURE parsing fixes&lt;/li&gt;
&lt;li&gt;Programmer friendly version information now available (imapclient.version_info)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;a class=&quot;reference external&quot; href=&quot;http://imapclient.freshfoo.com/browser/NEWS&quot;&gt;NEWS&lt;/a&gt; file and &lt;a class=&quot;reference external&quot; href=&quot;http://imapclient.readthedocs.org/&quot;&gt;main documentation&lt;/a&gt; has more details on all of
the above.&lt;/p&gt;
&lt;p&gt;As always, IMAPClient can be installed from PyPI (&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;pip&lt;/span&gt; &lt;span class=&quot;pre&quot;&gt;install&lt;/span&gt;
&lt;span class=&quot;pre&quot;&gt;imapclient&lt;/span&gt;&lt;/tt&gt;) or downloaded from the &lt;a class=&quot;reference external&quot; href=&quot;http://imapclient.freshfoo.com/&quot;&gt;IMAPClient site&lt;/a&gt;.&lt;/p&gt;</content>
		<author>
			<name>Menno Smits</name>
			<email>menno AT freshfoo DOT com</email>
			<uri>http://freshfoo.com/blog</uri>
		</author>
		<source>
			<title type="html">Menno's Musings</title>
			<subtitle type="html">software | life | whatever</subtitle>
			<link rel="self" href="http://freshfoo.com/blog/index.atom"/>
			<id>http://freshfoo.com/blog/index.atom</id>
			<updated>2012-02-05T00:22:21+00:00</updated>
			<rights type="html">Copyright 2009 Menno Smits</rights>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">New place, new time, same great Dojo</title>
		<link href="http://ramblings.timgolden.me.uk/2011/11/04/new-place-new-time-same-great-dojo/"/>
		<id>http://ramblings.timgolden.me.uk/2011/11/04/new-place-new-time-same-great-dojo/</id>
		<updated>2011-11-04T08:42:09+00:00</updated>
		<content type="html">&lt;p&gt;Last night, the London Python Dojo were the guests of &lt;a href=&quot;http://www.mendeley.com/&quot;&gt;Mendeley&lt;/a&gt; on the Clerkenwell Road. I was pleased to discover while chatting over the pizza and beer that I wasn&amp;#8217;t the only one to have wandered round the area a few times before hitting on the right spot. Although I had a map of some sort, I&amp;#8217;d forgotten just how cluttered central London is: how many passageways, tucked-away building and unlabelled streets.&lt;/p&gt;
&lt;p&gt;But it was worth it. Mendeley have larger offices than our usual host, &lt;a href=&quot;http://fry-it.com&quot;&gt;Fry-IT&lt;/a&gt;. And while there were slightly fewer of us than normal (low 20s as opposed to the usual high 20s) it was still great to have a bit of breathing space. Thanks very much to the guys at Mendeley for hosting us (and providing pizza, drinks &amp;#038; snacks).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://twitter.com/#!/tartley&quot;&gt;Jonathan Hartley&lt;/a&gt; was making his debut as compere and managed very effectively. Well&amp;#8230; fairly effectively. (I shouldn&amp;#8217;t laugh: it&amp;#8217;s my turn next month). He&amp;#8217;d lined up three &amp;#8220;lightning&amp;#8221; talks to kick off with. First up was Ian &amp;#8212; who&amp;#8217;d arranged for us to use the place. He explained what Mendeley does (a sort of social network for research students) and how they use Python (mostly as a scripting API) and demo-ed some fairly nifty visualisations and tools which people had built on top of their product. Jonathan himself spoke last to ask for help with a Django concurrency issue. Which he promptly got. In between was Robert Rees who showed-and-told very effectively the recently-added &lt;a href=&quot;http://www.heroku.com/&quot;&gt;Heroku&lt;/a&gt; support for Python. This enlarged into a wider discussion of Heroku itself and of its competitors in the Django/Python world.&lt;/p&gt;
&lt;p&gt;Then the Dojo itself. As usual, we had a whiteboard available beforehand for people to propose ideas which were then voted on. The Roman Numeral Calculator remained top of the list of unchosen ideas, but the surprising winner was Robert&amp;#8217;s suggestion of an ASCII Art Streetfighter clone. (Chosen only after a second round of voting with a Multiple Transferrable Vote). Once this was settled, it was a simple matter of dividing into teams and hitting the editor.&lt;/p&gt;
&lt;p&gt;Or almost. We initially failed to be able to count up to 5 in order to divide into teams. Having finally achieved this intellectual feat, we encountered the opposite problem to the one we normally face at Fry IT. There, the office is so small that you&amp;#8217;re squeezing into space. At Mendeley, there&amp;#8217;s so much space that you&amp;#8217;re wandering around for ages trying to find the best spot. And then you&amp;#8217;ve got to find the WiFi (which Ian had considerately explained about). And then you&amp;#8217;ve got to manually set your DNS Servers to something (as the DHCP wasn&amp;#8217;t handing out DNS). Slightly geekily, the WiFi password is mathematical making it easy to remember but still quite long.&lt;/p&gt;
&lt;p&gt;And then, in our case, you had to find the &lt;a href=&quot;http://inventwithpython.com/pygcurse/&quot;&gt;Pygame curses emulation&lt;/a&gt; which someone knows exists but can&amp;#8217;t quite remember the name of. Having got there (with about 20 minutes left now to do the actual coding) you basically scramble your way through a stunted version of Streetfighter (whatever that is; I have no idea), getting a basic solution on which you layer colour and fonts in the manner of lipstick and pigs :)&lt;/p&gt;
&lt;p&gt;Finally, the endgame; and it&amp;#8217;s the usual hilarious collection of imaginative approaches, stylishly-designed code, and desperate hackery. We saw: elegant ASCII art; flying bullets; gratuitous use of decorators; and many entertaining attempts to achieve an equilibrium between using classy and best-practice code and actually coming up with a solution within the timeframe!&lt;/p&gt;
&lt;p&gt;I don&amp;#8217;t know where we&amp;#8217;ll be next month, but stay tuned to the &lt;a href=&quot;http://mail.python.org/mailman/listinfo/python-uk&quot;&gt;python-uk&lt;/a&gt; list where stuff is announced.&lt;/p&gt;</content>
		<author>
			<name>Tim Golden</name>
			<uri>http://ramblings.timgolden.me.uk</uri>
		</author>
		<source>
			<title type="html">Moderate Realism » Tech</title>
			<subtitle type="html">The ramblings of Tim Golden</subtitle>
			<link rel="self" href="http://ramblings.timgolden.me.uk/category/tech/feed"/>
			<id>http://ramblings.timgolden.me.uk/category/tech/feed</id>
			<updated>2012-02-03T12:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">StrongSteam alpha, HackerNewsLondon, Startup-Chile</title>
		<link href="http://ianozsvald.com/2011/10/26/strongsteam-alpha-hackernewslondon-startup-chile/"/>
		<id>http://ianozsvald.com/?p=1235</id>
		<updated>2011-10-26T10:29:29+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;#8217;m a little behind with the blogging so here&amp;#8217;s the short version. &lt;a title=&quot;AppStore for AI and data mining tools&quot; href=&quot;http://strongsteam.com/&quot;&gt;StrongSteam&lt;/a&gt; has been under constant dev for 2 months, we&amp;#8217;re close to putting up the first AI tools behind a few Python demos (hopefully it&amp;#8217;ll be up next week). I&amp;#8217;m talking on this at &lt;a href=&quot;http://www.meetup.com/HNLondon/events/37828982/&quot;&gt;HackerNewsLondon&lt;/a&gt; tomorrow night.&lt;/p&gt;
&lt;p&gt;We haven&amp;#8217;t (quite) finished the demos so it&amp;#8217;ll be a slideshow, I&amp;#8217;m thinking of running a workshop in a month or so to show what&amp;#8217;s possible, talk through the limitations and possibilities and help people got comfy with the API.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m also very pleased to say that we were accepted into the &lt;a href=&quot;http://www.startupchile.org/&quot;&gt;StartupChile&lt;/a&gt; programme alongside &lt;a href=&quot;http://emilytoop.com/2011/10/11/creating-an-intelligent-interactive-storybook-for-kids/&quot;&gt;RadicalRobot&lt;/a&gt; (my better half). In StrongSteam Kyran and I will get 6 months in Santiago with a $40k budget (for no equity!) to build our API and this opens the door to further travel. We&amp;#8217;re also very happy to welcome &lt;a href=&quot;https://twitter.com/#!/BaltoRouberol&quot;&gt;Balthazar Rouberol&lt;/a&gt; (&lt;a href=&quot;http://www.linkedin.com/pub/balthazar-rouberol/41/a76/55&quot;&gt;linkedin&lt;/a&gt;) to our team, he&amp;#8217;ll be joining us remotely as an intern for 6 months.&lt;/p&gt;
&lt;p&gt;Our biggest priority now is to get the alpha out there. If you&amp;#8217;re curious to see what we&amp;#8217;re doing please follow us via &lt;a href=&quot;https://twitter.com/#!/strongsteamapi&quot;&gt;@strongsteamapi&lt;/a&gt; and join the mailing list on the &lt;a href=&quot;http://strongsteam.com/&quot;&gt;strongsteam&lt;/a&gt; homepage.&lt;/p&gt;
&lt;p&gt;We also have two surveys &amp;#8211; the first is so you can tell us about your &lt;a href=&quot;http://www.surveymonkey.com/s/7377L7L&quot;&gt;general AI interest&lt;/a&gt;, the second focuses on some of the points raised in the first to tell us &lt;a href=&quot;http://www.surveymonkey.com/s/SWTWB6S&quot;&gt;more about your needs&lt;/a&gt;. We&amp;#8217;d &lt;em&gt;really&lt;/em&gt; appreciate your input here if you have 10 minutes to spare.&lt;/p&gt;
&lt;hr /&gt;
Ian applies Artificial Intelligence as an Artificial Intelligence Researcher for companies (&lt;a href=&quot;http://morconsulting.com&quot; title=&quot;Artificial Intelligence consultant&quot;&gt;Mor Consulting&lt;/a&gt;), co-founded the &lt;a href=&quot;http://strongsteam.com&quot; title=&quot;Artificial Intelligence toolkit&quot;&gt;StrongSteam&lt;/a&gt; A.I. datamining toolkit, co-authored &lt;a href=&quot;http://socialtiesapp.com/&quot; title=&quot;Social Ties social discovery tool for conferences and events&quot;&gt;SocialTies&lt;/a&gt;, programs Python, writes &lt;a href=&quot;http://TheScreencastingHandbook.com&quot; title=&quot;Screencasting Tutorial eBook&quot;&gt;The Screencasting Handbook&lt;/a&gt; and is also a sea-side dweller and consumer of fine coffees.</content>
		<author>
			<name>Ian Ozsvald</name>
			<uri>http://ianozsvald.com</uri>
		</author>
		<source>
			<title type="html">Entrepreneurial Geekiness » Python</title>
			<subtitle type="html">My thoughts on screencasting, the A.I. Cookbook and high-tech entrepreneurship</subtitle>
			<link rel="self" href="http://ianozsvald.com/category/python/feed/"/>
			<id>http://ianozsvald.com/category/python/feed/</id>
			<updated>2012-02-02T08:22:24+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Compiling MacVim with Python 2.7</title>
		<link href="http://tartley.com/?p=1355"/>
		<id>http://tartley.com/?p=1355</id>
		<updated>2011-10-18T11:25:03+00:00</updated>
		<content type="html">&lt;p&gt;I love the brilliant Vim plugin &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=2441&quot;&gt;pyflakes-vim&lt;/a&gt;, which highlights errors &amp;amp; warnings, and since I got a MacBook for work, I&amp;#8217;ve been using MacVim a lot.&lt;/p&gt;
&lt;p&gt;This combination has a problem, that MacVim uses the OSX system default Python 2.6, so pyflakes is unable to handle Python 2.7 syntax, such as set literals. These are marked as a syntax errors, which prevents the rest of the file from being parsed.&lt;/p&gt;
&lt;p&gt;The solution is to compile your own MacVim, using Python 2.7 instead of the system Python. The following commands got MacVim compiled for me:&lt;/p&gt;
&lt;pre lang=&quot;bash&quot;&gt;#!/bin/bash
git clone git://github.com/b4winckler/macvim.git
cd macvim/src
export LDFLAGS=-L/usr/lib
./configure
    --with-features=huge
    --enable-rubyinterp
    --enable-perlinterp
    --enable-cscope
    --enable-pythoninterp
    --with-python-config-dir=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
make
open MacVim/build/Release
echo Drag MacVim.app to your Applications directory&lt;/pre&gt;
&lt;p&gt;Without the LDFLAGS setting, I was missing some symbols at link. The &amp;#8211;with-python-config-dir entry came from typing &amp;#8216;which python&amp;#8217; to find where my Python 2.7 install lives, and modifying that result to find its &amp;#8216;config&amp;#8217; directory (whatever that is) near to the binary.&lt;/p&gt;
&lt;p&gt;As indicated, install by dragging the resulting macvim/src/MacVim/build/Release/MacVim.app into your Applications directory.&lt;/p&gt;
&lt;p&gt;Open up MacVim, and check out the built-in Python version:&lt;/p&gt;
&lt;pre lang=&quot;vim&quot;&gt;:python import sys; print sys.version
2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)&lt;/pre&gt;
&lt;p&gt;And files with set literals are now correctly parsed for errors.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; This only works if the Python 2.7 is your default &amp;#8216;python&amp;#8217; executable. Otherwise, or if you get &amp;#8220;ImportError: No module named site”, see Richard&amp;#8217;s comments below.&lt;/p&gt;</content>
		<author>
			<name>Jonathan Hartley</name>
			<uri>http://tartley.com</uri>
		</author>
		<source>
			<title type="html">tartley.com</title>
			<subtitle type="html">It has been said that a website devoted to oneself is the greatest act of hubris. Welcome aboard...</subtitle>
			<link rel="self" href="http://tartley.com/?feed=rss2"/>
			<id>http://tartley.com/?feed=rss2</id>
			<updated>2011-12-06T10:22:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Python 2.7 regular expression cheatsheet</title>
		<link href="http://tartley.com/?p=1349"/>
		<id>http://tartley.com/?p=1349</id>
		<updated>2011-10-14T10:20:11+00:00</updated>
		<content type="html">&lt;p&gt;Couldn&amp;#8217;t find one of these, so I whipped one up.&lt;/p&gt;
&lt;p&gt;Bit of restructured text:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/tartley/python-regex-cheatsheet/blob/master/cheatsheet.rst&quot;&gt;https://github.com/tartley/python-regex-cheatsheet/blob/master/cheatsheet.rst&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Install some Python packages:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/tartley/python-regex-cheatsheet/blob/master/requirements.txt&quot;&gt;https://github.com/tartley/python-regex-cheatsheet/blob/master/requirements.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Invoke rst2pdf:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/tartley/python-regex-cheatsheet/blob/master/Makefile&quot;&gt;https://github.com/tartley/python-regex-cheatsheet/blob/master/Makefile&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Get a nice PDF out:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/downloads/tartley/python-regex-cheatsheet/cheatsheet.pdf&quot;&gt;Python 2.7 regular expression cheatsheet&lt;/a&gt; (click this link or the image for the most up-to-date PDF from github.)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/downloads/tartley/python-regex-cheatsheet/cheatsheet.pdf&quot;&gt;&lt;img class=&quot;alignnone size-full wp-image-1363&quot; title=&quot;Python regular expression cheatsheet 0.3.0&quot; src=&quot;http://tartley.com/wp-content/uploads/2011/10/Python-regular-expression-cheatsheet-0.3.0.png&quot; alt=&quot;&quot; width=&quot;795&quot; height=&quot;948&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content>
		<author>
			<name>Jonathan Hartley</name>
			<uri>http://tartley.com</uri>
		</author>
		<source>
			<title type="html">tartley.com</title>
			<subtitle type="html">It has been said that a website devoted to oneself is the greatest act of hubris. Welcome aboard...</subtitle>
			<link rel="self" href="http://tartley.com/?feed=rss2"/>
			<id>http://tartley.com/?feed=rss2</id>
			<updated>2011-12-06T10:22:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Amazing Mozilla Annual Report Video</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/tXRO5x5fQa8/amazing-mozilla-annual-report-video.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-7763158401872371527</id>
		<updated>2011-10-10T13:45:42+00:00</updated>
		<content type="html">I've just been looking at the &lt;a href=&quot;http://bit.ly/pWS34Y&quot;&gt;Mozilla 2010 Annual Report&lt;/a&gt;. It makes terrific reading. But most of all I really love the &lt;a href=&quot;http://bit.ly/pWS34Y&quot;&gt;video that they have brought out to accompany it&lt;/a&gt;. To say it's inspirational to the open source world doesn't do it justice. I have rarely seen so clear an exposition of the ideals that have led me to serve the Python community and the Python Software Foundation for the last few years.&lt;br /&gt;
&lt;br /&gt;
Sure, Mozilla had problems when they inherited the Netscape code base. They have matured as an organization, and are currently clearly demonstrating the meaning of &lt;i&gt;release early, release often&lt;/i&gt;&amp;nbsp;with high-quality feature releases at frequent intervals. It makes me wish I could offer such inspiration to the Python community.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-7763158401872371527?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=tXRO5x5fQa8:ijfHTh1TBKs:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=tXRO5x5fQa8:ijfHTh1TBKs:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=tXRO5x5fQa8:ijfHTh1TBKs:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/tXRO5x5fQa8&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">mock 0.8 beta 4 released: bugfix and minor features</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/tm5ZSXA3cDE/arch_d7_2011_10_08.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/tm5ZSXA3cDE/arch_d7_2011_10_08.shtml</id>
		<updated>2011-10-10T01:05:00+00:00</updated>
		<content type="html">I've released mock 0.8 beta 4. You can download it it or install it with: pip install -U mock==dev mock is a library for testing in Python. ... [602 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=tm5ZSXA3cDE:0f5sO9cEtGc:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=tm5ZSXA3cDE:0f5sO9cEtGc:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=tm5ZSXA3cDE:0f5sO9cEtGc:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=tm5ZSXA3cDE:0f5sO9cEtGc:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=tm5ZSXA3cDE:0f5sO9cEtGc:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=tm5ZSXA3cDE:0f5sO9cEtGc:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=tm5ZSXA3cDE:0f5sO9cEtGc:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/tm5ZSXA3cDE&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">PyCon Submissions: Less Than a Week to Go!</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/AnYhiiAtQEM/pycon-submissions-less-than-week-to-go.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-220738131505843583</id>
		<updated>2011-10-07T09:16:34+00:00</updated>
		<content type="html">If you have been thinking about submitting a proposal to PyCon for a talk, tutorial or poster session then delay no longer. Submissions close on &lt;b&gt;October 12&lt;/b&gt;, so you have less than a week to make it!&lt;br /&gt;
&lt;br /&gt;
The &lt;a href=&quot;http://us.pycon.org/2012/cfp/&quot;&gt;call for proposals&lt;/a&gt; tells you everything you need to know, so go NOW and do something you know you will never regret. It's only through the contributions of so many in the Python community that PyCon continues from strength to strength. The 2012 conference will be the tenth PyCon, and the first on the West coast. I just &lt;i&gt;know&lt;/i&gt;&amp;nbsp;it's going to be terrific.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-220738131505843583?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=AnYhiiAtQEM:84lrezOjQCA:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=AnYhiiAtQEM:84lrezOjQCA:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=AnYhiiAtQEM:84lrezOjQCA:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/AnYhiiAtQEM&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">ws4py &amp;#8211; WebSocket client and server library for Python</title>
		<link href="http://www.defuze.org/archives/271-ws4py-websocket-client-and-server-library-for-python.html"/>
		<id>http://www.defuze.org/?p=271</id>
		<updated>2011-09-06T18:55:04+00:00</updated>
		<content type="html">&lt;p&gt;Recently I released &lt;a title=&quot;ws4py - github repository&quot; href=&quot;https://github.com/Lawouach/WebSocket-for-Python&quot; target=&quot;_blank&quot;&gt;ws4py&lt;/a&gt;, a package that provides client and server WebSocket support for Python 2.6 and 2.7.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s first have a quick overview of what ws4py offers for now:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;WebSocket specification &lt;a title=&quot;WebSocket draft-10 specification&quot; href=&quot;http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10&quot; target=&quot;_blank&quot;&gt;draft-10&lt;/a&gt; of the current specification.&lt;/li&gt;
&lt;li&gt;A threaded client. This gives a simple client that doesn&amp;#8217;t require an external dependency.&lt;/li&gt;
&lt;li&gt;A Tornado client. This client is based on &lt;a title=&quot;Tornado Home&quot; href=&quot;http://www.tornadoweb.org/&quot; target=&quot;_blank&quot;&gt;Tornado 2.0&lt;/a&gt; which is quite a popular way of running asynchronous networking code these days. Tornado provides its own server implementation so I didn&amp;#8217;t include mine in ws4py.&lt;/li&gt;
&lt;li&gt;A &lt;a title=&quot;CherryPy Home&quot; href=&quot;http://www.cherrypy.org&quot; target=&quot;_blank&quot;&gt;CherryPy&lt;/a&gt; extension so that you can integrate WebSocket from within your &lt;a title=&quot;CherryPy 3.2.1 downloads&quot; href=&quot;http://download.cherrypy.org/cherrypy/3.2.1/&quot; target=&quot;_blank&quot;&gt;CherryPy 3.2.1&lt;/a&gt; server.&lt;/li&gt;
&lt;li&gt;A gevent server based on the popular &lt;a title=&quot;gevent PyPi&quot; href=&quot;http://pypi.python.org/pypi/gevent/0.13.6&quot; target=&quot;_blank&quot;&gt;gevent library&lt;/a&gt;. This is courtesy of &lt;a href=&quot;https://github.com/progrium&quot; target=&quot;_blank&quot;&gt;Jeff Lindsay&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Based on Jeff&amp;#8217;s work, a pure WSGI middleware as well (available in the current master branch only until the next release).&lt;/li&gt;
&lt;li&gt;ws4py runs on Android devices thanks to the &lt;a href=&quot;http://code.google.com/p/android-scripting/&quot; target=&quot;_blank&quot;&gt;SL4A&lt;/a&gt; package&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hopefully more client and servers will be added along the way as well as Python 3.x support. The former should be rather simple to add due to the way I designed ws4py.&lt;/p&gt;
&lt;p&gt;The main idea is to make a distinction between the bytes provider and the bytes processing. The former is essentially reading and writing bytes from the connected socket. The latter is the function of making something out of the received bytes based on the WebSocket specification. In most implementations I have seen so far, both are rather heavily intertwined making it difficult to use a different bytes provider.&lt;/p&gt;
&lt;p&gt;ws4py tries a different path by relying on a great feature of Python: the possibility to &lt;a href=&quot;http://www.python.org/dev/peps/pep-0342/&quot; target=&quot;_blank&quot;&gt;send data back to a generator&lt;/a&gt;. For instance, the frame parsing yields the quantity of bytes each time it needs more and the caller feeds back the generator those bytes once they are received. In fact, the caller of a frame parser is a stream object which acts the same way. The caller of that stream object is in fact the bytes provider (a client or a server). The stream is in charge of aggregating frames into a WebSocket message. Thanks to that design, both the frame and stream objects are totally unaware of the bytes provider and can be easily adapted in various contexts (gevent, tornado, CherryPy, etc.).&lt;/p&gt;
&lt;p&gt;On my TODO list for ws4py:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Upgrade to a more recent version of the specification&lt;/li&gt;
&lt;li&gt;Python 3.x implementation&lt;/li&gt;
&lt;li&gt;Better documentation, read, write documentation.&lt;/li&gt;
&lt;li&gt;Better performances on very large WebSocket messages&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content>
		<author>
			<name>Sylvain Hellegouarch</name>
			<uri>http://www.defuze.org</uri>
		</author>
		<source>
			<title type="html">defuze.org</title>
			<link rel="self" href="http://www.defuze.org/feed/atom"/>
			<id>http://www.defuze.org/feed/atom</id>
			<updated>2011-09-06T19:22:39+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">matplotlib and numpy for Python 2.7 on Mac OS X Lion</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/_c0L8HoC6mw/arch_d7_2011_09_03.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/_c0L8HoC6mw/arch_d7_2011_09_03.shtml</id>
		<updated>2011-09-05T00:18:13+00:00</updated>
		<content type="html">Unfortunately, due to an API change, the latest released version of matplotlib is incompatible with libpng 1.5. Take a wild guess as to which version comes with Mac OS X Lion. ... [275 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=_c0L8HoC6mw:2V6wlEwoBg8:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=_c0L8HoC6mw:2V6wlEwoBg8:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=_c0L8HoC6mw:2V6wlEwoBg8:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=_c0L8HoC6mw:2V6wlEwoBg8:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=_c0L8HoC6mw:2V6wlEwoBg8:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=_c0L8HoC6mw:2V6wlEwoBg8:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=_c0L8HoC6mw:2V6wlEwoBg8:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/_c0L8HoC6mw&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Conflict of Interest</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/s6GTfUcyFUI/wow-i-cant-believe-how-quickly.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-5883296300626461371</id>
		<updated>2011-09-04T08:30:24+00:00</updated>
		<content type="html">Wow, I can't believe how quickly DjangoCon has sneaked up on me. Thought everything was under control, but here I am printing delegate badges early on Sunday morning. Truth to tell, it's a labor of love, and reminds me fondly of the first days of PyCon when a team of volunteers including me as chairman pretty much established the way PyCons would be, setting a determined trend away from full commercial conferences and using more of the ethos of the sci-fi community conferences. We also got an amazing amount of help from the Perl community, who had established the &lt;i&gt;Yet Another Perl Conference&lt;/i&gt;&amp;nbsp;(YAPC) format some time before. This initiative was very much aligned with the EuroPython effort, begun almost a year before, which was also a community-run conference. The EuroPython organizers also attended and gave valuable advice.&lt;br /&gt;
&lt;br /&gt;
In one way DjangoCon is the answer to a question I have been thinking quite hard about for quite a long time (&lt;i&gt;viz&lt;/i&gt;&amp;nbsp;how to provide sufficient value to open source communities to ensure commercial viability). My relationship (and that of my companies) with the&amp;nbsp;Django Software Foundation&amp;nbsp;is in essence a business one, though I believe that my long experience in open source communities allows me to better predict and cater for the demand for conferences for such audiences, and means that I know more of the people involved.&lt;br /&gt;
&lt;br /&gt;
Unlike PyCon, therefore, DjangoCon is a product of my commercial existence rather than of voluntary service. The rights to the name are owned by the&amp;nbsp;DSF&amp;nbsp;and our Open Bastion subsidiary runs the conference (with the capable assistance of Nancy Asche's team) on the Foundation's behalf, passing back some of the profit. This makes it a somewhat different event for me, as I have to take overall responsibility for everything from the quality of the lunches to the adequacy of the network because&amp;nbsp;&lt;i&gt;people have paid money for the conference&lt;/i&gt;. Fortunately most people's expectations are reasonable. I sometimes jokingly tell people that 70% of it is adequate network bandwidth and sufficient supplies of caffeine (as always the devil is in the details).&lt;br /&gt;
&lt;br /&gt;
For PyCon, of course, Jesse Noller (chairman for the next two years) is doing pretty much the same thing for the PSF, as a volunteer. Knowing Jesse's workaholic tendencies I have no doubt he will do an excellent job, but I fear for his sanity all the same (mine doesn't matter, I've been batty for donkey's years). He puts a ferocious energy into his efforts and makes amazing progress, and I know that PyCon will continue to develop and mature under his guidance.&lt;br /&gt;
&lt;br /&gt;
As the conferences side of the business develops there is the likelihood of a conflict of interest. If my companies were to run Python conferences then it could be argued that these might tend to reduce the PSF's PyCon income, which could easily be construed as an abuse of my position as PSF chair. This being the case I am inclined to consider conferences about non-Python topics, but this might turn out to be cutting my nose off to spite my face. It's hard to think of ways to serve the Python community while also making a living from it.&lt;br /&gt;
&lt;br /&gt;
If you have any ideas about how the two might be ethically combined I'd be interested to hear them.&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-5883296300626461371?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=s6GTfUcyFUI:BRaAPfbKyPo:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=s6GTfUcyFUI:BRaAPfbKyPo:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=s6GTfUcyFUI:BRaAPfbKyPo:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/s6GTfUcyFUI&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">strongsteam – an “AppStore for A.I. and data mining tools”</title>
		<link href="http://ianozsvald.com/2011/08/31/strongsteam-an-appstore-for-a-i-and-data-mining-tools/"/>
		<id>http://ianozsvald.com/?p=1227</id>
		<updated>2011-08-31T12:24:56+00:00</updated>
		<content type="html">&lt;p&gt;Kyran and I are starting work on a new project &amp;#8211; &lt;a title=&quot;artificial intelligence and data mining tools&quot; href=&quot;http://strongsteam.com/&quot;&gt;strongsteam&lt;/a&gt; offers a web API with artificial intelligence and data mining tools. The goal is to make it easy for you to do things like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;get the text out of images using optical character recognition&lt;/li&gt;
&lt;li&gt;determine whether two images look the same and if one object (e.g. a certain book or a can of coke) can be found in another&lt;/li&gt;
&lt;li&gt;use natural language processing to analyse, cluster and compare text&lt;/li&gt;
&lt;li&gt;extract text from audio (e.g. to pull out keywords from podcasts)&lt;/li&gt;
&lt;li&gt;use machine learning on text to derive new data&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&amp;#8217;d like to join the closed alpha then visit &lt;a href=&quot;http://strongsteam.com/&quot;&gt;strongsteam&lt;/a&gt; and add your email to the announce list on the homepage.&lt;/p&gt;
&lt;p&gt;We&amp;#8217;ve started with Python bindings which make it easy to talk to the strongsteam web service. Initially we&amp;#8217;ll wrap open source tools that we&amp;#8217;ve used along with lots of our own A.I. data mining tools from years of work in my &lt;a title=&quot;artificial intelligence consulting&quot; href=&quot;http://morconsulting.com/&quot;&gt;Mor Consulting&lt;/a&gt; A.I. consultancy.&lt;/p&gt;
&lt;p&gt;At &lt;a href=&quot;http://www.euroscipy.org/conference/euroscipy2011&quot;&gt;EuroSciPy&lt;/a&gt; last week I demo&amp;#8217;d using O.C.R. to extract the words from plant labels at Wakehurst Place gardens so you can lookup the plant on Wikipedia once you&amp;#8217;ve taken a photo like this one:&lt;/p&gt;
&lt;div id=&quot;attachment_1229&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://ianozsvald.com/wp-content/uploads/2011/08/09.jpg&quot;&gt;&lt;img class=&quot;size-medium wp-image-1229&quot; title=&quot;Ostrich Plume Fern - Matteuccia Struthiopteris&quot; src=&quot;http://ianozsvald.com/wp-content/uploads/2011/08/09-300x225.jpg&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;225&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Plant label for Ostrich Plume Fern at Wakehurst Place (Sussex)&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Now we&amp;#8217;re looking at applying O.C.R. to conference name-badges, this will be a bit of a mash-up from data used in our &lt;a href=&quot;http://socialtiesapp.com/&quot;&gt;SocialTies&lt;/a&gt; conference app and &lt;a href=&quot;http://lanyrd.com/&quot;&gt;Lanyrd.com&lt;/a&gt;&amp;#8216;s data. Next we&amp;#8217;ll look at image matching and some text processing tools.&lt;/p&gt;
&lt;hr /&gt;
Ian applies Artificial Intelligence as an Artificial Intelligence Researcher for companies (&lt;a href=&quot;http://morconsulting.com&quot; title=&quot;Artificial Intelligence consultant&quot;&gt;Mor Consulting&lt;/a&gt;), co-founded the &lt;a href=&quot;http://strongsteam.com&quot; title=&quot;Artificial Intelligence toolkit&quot;&gt;StrongSteam&lt;/a&gt; A.I. datamining toolkit, co-authored &lt;a href=&quot;http://socialtiesapp.com/&quot; title=&quot;Social Ties social discovery tool for conferences and events&quot;&gt;SocialTies&lt;/a&gt;, programs Python, writes &lt;a href=&quot;http://TheScreencastingHandbook.com&quot; title=&quot;Screencasting Tutorial eBook&quot;&gt;The Screencasting Handbook&lt;/a&gt; and is also a sea-side dweller and consumer of fine coffees.</content>
		<author>
			<name>Ian Ozsvald</name>
			<uri>http://ianozsvald.com</uri>
		</author>
		<source>
			<title type="html">Entrepreneurial Geekiness » Python</title>
			<subtitle type="html">My thoughts on screencasting, the A.I. Cookbook and high-tech entrepreneurship</subtitle>
			<link rel="self" href="http://ianozsvald.com/category/python/feed/"/>
			<id>http://ianozsvald.com/category/python/feed/</id>
			<updated>2012-02-02T08:22:24+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Zoner - DNS management UI</title>
		<link href="http://chrismiles.livejournal.com/24654.html"/>
		<id>urn:lj:livejournal.com:atom1:chrismiles:24654</id>
		<updated>2011-08-22T00:25:43+00:00</updated>
		<content type="html">A couple of years ago, while learning &lt;a href=&quot;http://turbogears.org/&quot; rel=&quot;nofollow&quot;&gt;TurboGears&lt;/a&gt;, I wrote a web application to simplify management of &lt;a href=&quot;http://en.wikipedia.org/wiki/Zone_file&quot; rel=&quot;nofollow&quot;&gt;DNS zone files&lt;/a&gt;.  Fast forward to today and I finally found a few minutes to clean it up a bit and make a release.&lt;br /&gt;&lt;br /&gt;It is called &lt;a href=&quot;http://www.psychofx.com/zoner/&quot; rel=&quot;nofollow&quot;&gt;Zoner&lt;/a&gt; and differs from many DNS management interfaces in that it works directly with live zone files.  The zone files remain the master copy of domain details and can still be edited manually without effecting Zoner, as opposed to storing the domain structure in a database and generating zone files when needed (or reconfiguring bind to read directly from SQL).  It also stores an audit trail for all changes (made through Zoner) and zones can be rolled back to any previous version.&lt;br /&gt;&lt;br /&gt;Zoner might also be a useful reference app for anyone learning TurboGears 1.0.  It is relatively simple, uses &lt;a href=&quot;http://chrismiles.livejournal.com/data/www.sqlalchemy.org&quot;&gt;SQLAlchemy&lt;/a&gt; and &lt;a href=&quot;http://chrismiles.livejournal.com/data/www.kid-templating.org&quot;&gt;Kid&lt;/a&gt; with &lt;a href=&quot;http://docs.turbogears.org/1.0/PaginateDecorator&quot; rel=&quot;nofollow&quot;&gt;Paginate&lt;/a&gt; and &lt;a href=&quot;http://docs.turbogears.org/1.0/Widgets&quot; rel=&quot;nofollow&quot;&gt;Form widgets&lt;/a&gt;.</content>
		<author>
			<name>Chris Miles</name>
			<uri>http://chrismiles.livejournal.com/</uri>
		</author>
		<source>
			<title type="html">CM | tech &amp;gt;&amp;gt; LJ</title>
			<subtitle type="html">Chris Miles</subtitle>
			<link rel="self" href="http://chrismiles.livejournal.com/data/atom"/>
			<id>urn:lj:livejournal.com:atom1:chrismiles</id>
			<updated>2012-01-20T00:22:35+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Using Fabric to apply Puppet scripts</title>
		<link href="http://feedproxy.google.com/~r/Magpiebrain/~3/vKakzvMfShA/"/>
		<id>http://www.magpiebrain.com/?p=1120</id>
		<updated>2011-08-21T15:20:54+00:00</updated>
		<content type="html">&lt;p&gt;On my current client project, in terms of managing configuration of the various environments, I have separated things into two problem spaces &amp;#8211; provisioning hosts, and configuring hosts. Part of the reason for this separation is that although targeting AWS, we do need to allow us to support alternative services in the future, but I also consider the type of tasks to be rather different and to require different types of tools.&lt;/p&gt;
&lt;p&gt;For provisioning hosts I am using the Python AWS API &lt;a href=&quot;http://boto.cloudhackers.com/&quot;&gt;Boto&lt;/a&gt;. For configuring the hosts once provisioned, I am using Puppet. I remain unconvinced as to the relative merits of PuppetMaster or Chef Server (see &lt;a href=&quot;http://www.magpiebrain.com/2010/10/20/chef-versioned-recipes/&quot;&gt;my previous post&lt;/a&gt; on the subject) and so have decided to stick with using PuppetSolo so I can manage versioning how I would like. This leaves me with a challenge &amp;#8211; how do I apply the puppet configuration for the hosts once provisioned with Boto? I also wanted to provide a relatively uniform command-line interface to the development team for other tasks like running builds etc. Some people use cron-based polling for this, but I wanted a more direct form of control. I also wanted to avoid the need to run any additional infrastructure, so mcollective was never something I was particularly interested in.&lt;/p&gt;
&lt;p&gt;After a brief review of my &amp;#8220;Things I should look at later&amp;#8221; list it looked like time to give &lt;a href=&quot;http://docs.fabfile.org/&quot;&gt;Fabric&lt;/a&gt; a play.&lt;/p&gt;
&lt;p&gt;Fabric is a Python-based tool/library which excels at creating command-line tools for machine management. It&amp;#8217;s bread and butter is script-based automation of machines via SSH &amp;#8211; many people in fact use hand-rolled scripts on top of Fabric as an alternative to systems like Chef and Puppet. The documentation is very good, and I can heartily recommend the &lt;a href=&quot;http://docs.fabfile.org/en/1.2.0/tutorial.html&quot;&gt;Fabric tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The workflow I wanted was simple. I wanted to be able to checkout a specific version of code locally, run one command to bring up a host and also apply a given configuration set. My potentially naive solution to this problem is to simply tar up my puppet scripts, upload them, and then run puppet. Here is the basic script:&lt;/p&gt;
&lt;pre class=&quot;brush: python; title: ; notranslate&quot;&gt;
@task
def provision-box():
  public_dns = provision_using_boto()

  local(&amp;quot;tar cfz /tmp/end-bundle.tgz path/to/puppet_scripts/*&amp;quot;)
  with settings(host_string=public_dns, user=&amp;quot;ec2-user&amp;quot;, key_filename=&amp;quot;path/to/private_key.pem&amp;quot;):
    run(&amp;quot;sudo yum install -y puppet&amp;quot;)
    put(&amp;quot;/tmp/end-bundle.tgz&amp;quot;, &amp;quot;.&amp;quot;)
    run(&amp;quot;tar xf end-bundle.tgz &amp;amp;&amp;amp; sudo puppet --modulepath=/home/ec2-user/path/to/puppet_scripts/modules path/to/puppet_scripts/manifests/myscript.pp&amp;quot;)
&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;provision_using_boto()&lt;/code&gt; command is an exercise left to the reader, but &lt;a href=&quot;http://boto.cloudhackers.com/ec2_tut.html&quot;&gt;the documentation&lt;/a&gt; should point you in the right direction. If you stuck the above command in your &lt;code&gt;fabfile.py&lt;/code&gt;, all you need to do is run &lt;code&gt;fab provision-box&lt;/code&gt; to do the work. The first &lt;code&gt;yum install&lt;/code&gt; command is there to handle bootstraping of puppet (as it is not on the AMIs we are using) &amp;#8211; this will be a noop if the target host already has it installed.&lt;/p&gt;
&lt;p&gt;This example is much more simplified than the actual scripts as we have also implemented some logic to re-use ec2 instances to save time &amp;#038; money, and also a simplistic role system to manage different classes of machines. I may write up those ideas in a future post.&lt;/p&gt;
&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=vKakzvMfShA:hHg2Qgdf_Os:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=vKakzvMfShA:hHg2Qgdf_Os:7Q72WNTAKBA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=7Q72WNTAKBA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=vKakzvMfShA:hHg2Qgdf_Os:D7DqB2pKExk&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?i=vKakzvMfShA:hHg2Qgdf_Os:D7DqB2pKExk&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=vKakzvMfShA:hHg2Qgdf_Os:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<author>
			<name>Sam Newman</name>
			<uri>http://www.magpiebrain.com</uri>
		</author>
		<source>
			<title type="html">Magpiebrain</title>
			<link rel="self" href="http://feeds.feedburner.com/Magpiebrain"/>
			<id>http://feeds.feedburner.com/Magpiebrain</id>
			<updated>2012-02-05T00:22:04+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">mock 0.8 beta 3 released: feature complete</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/ENdjSLfOp-w/arch_d7_2011_08_13.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/ENdjSLfOp-w/arch_d7_2011_08_13.shtml</id>
		<updated>2011-08-17T23:35:36+00:00</updated>
		<content type="html">I've released mock 0.8 beta 3. You can download it it or install it with: pip install -U mock==dev mock is a library for testing in Python. ... [534 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=ENdjSLfOp-w:Ybi8oYI6ny8:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=ENdjSLfOp-w:Ybi8oYI6ny8:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=ENdjSLfOp-w:Ybi8oYI6ny8:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=ENdjSLfOp-w:Ybi8oYI6ny8:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=ENdjSLfOp-w:Ybi8oYI6ny8:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=ENdjSLfOp-w:Ybi8oYI6ny8:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=ENdjSLfOp-w:Ybi8oYI6ny8:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/ENdjSLfOp-w&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">FLVio video web service now encodes H.264 video</title>
		<link href="http://chrismiles.livejournal.com/24368.html"/>
		<id>urn:lj:livejournal.com:atom1:chrismiles:24368</id>
		<updated>2011-08-17T01:35:01+00:00</updated>
		<content type="html">We have just pushed live a new version of the &lt;a href=&quot;http://www.flvio.com/&quot; rel=&quot;nofollow&quot;&gt;FLVio video web service&lt;/a&gt; that gives clients the option to encode (Flash-compatible) &lt;a href=&quot;http://en.wikipedia.org/wiki/H.264&quot; rel=&quot;nofollow&quot;&gt;H.264&lt;/a&gt; video.&lt;br /&gt;&lt;br /&gt;Many people probably already know that Adobe &lt;a href=&quot;http://www.adobe.com/aboutadobe/pressroom/pressreleases/200708/082107FlashPlayer.html&quot; rel=&quot;nofollow&quot;&gt;added support for H.264 video&lt;/a&gt; (in an mp4 container) to &lt;a href=&quot;http://www.adobe.com/products/flashplayer/&quot; rel=&quot;nofollow&quot;&gt;Flash Player&lt;/a&gt; late last year.  This was welcome news to many people as H.264 is an open standard and provides much higher quality video (at lower bandwidths) than standard &quot;FLV&quot; video.&lt;br /&gt;&lt;br /&gt;The only gotcha is that end users need to have a recent version of Flash Player installed (Flash Player 9 Update 3 aka version 9.0.115.0 or newer) to playback H.264 video.&lt;br /&gt;&lt;br /&gt;However, many &lt;a href=&quot;http://www.jeroenwijering.com/?item=JW_FLV_Player&quot; rel=&quot;nofollow&quot;&gt;popular&lt;/a&gt; Flash media players can be configured to attempt to playback H.264 video within the browser and automatically fallback to the FLV alternative if the version of Flash Player is too old.  FLVio has been designed to support this by providing the option to encode both FLV and H.264 videos automatically for the client, providing easy access to the best of both worlds: high quality video playback and backwards compatibility.</content>
		<author>
			<name>Chris Miles</name>
			<uri>http://chrismiles.livejournal.com/</uri>
		</author>
		<source>
			<title type="html">CM | tech &amp;gt;&amp;gt; LJ</title>
			<subtitle type="html">Chris Miles</subtitle>
			<link rel="self" href="http://chrismiles.livejournal.com/data/atom"/>
			<id>urn:lj:livejournal.com:atom1:chrismiles</id>
			<updated>2012-01-20T00:22:35+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">mod_proxy_balancer gets a thumbs up</title>
		<link href="http://chrismiles.livejournal.com/21467.html"/>
		<id>urn:lj:livejournal.com:atom1:chrismiles:21467</id>
		<updated>2011-08-14T10:17:50+00:00</updated>
		<content type="html">At work we run a bunch of web applications (mostly &lt;a href=&quot;http://www.turbogears.com/&quot; rel=&quot;nofollow&quot;&gt;TurboGears&lt;/a&gt;, &lt;a href=&quot;http://www.cherrypy.org/&quot; rel=&quot;nofollow&quot;&gt;CherryPy&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://twistedmatrix.com/&quot; rel=&quot;nofollow&quot;&gt;Twisted&lt;/a&gt; apps) and host them behind &lt;a href=&quot;http://httpd.apache.org/&quot; rel=&quot;nofollow&quot;&gt;Apache&lt;/a&gt;, using &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_proxy.html&quot; rel=&quot;nofollow&quot;&gt;mod_proxy&lt;/a&gt; (and sometimes &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html&quot; rel=&quot;nofollow&quot;&gt;mod_rewrite&lt;/a&gt;) to present a clean URL to the outside world, but allowing each of the apps to run on their own private ports behind the scenes.  Different people manage different web apps.&lt;br /&gt;&lt;br /&gt;In front of our web farms we use hardware load balancers to handle request arbitration, which provides nice protection from servers or Apache instances going down.&lt;br /&gt;&lt;br /&gt;The biggest problem I've had with this configuration until now is that when we need to perform maintenance on a particular web application, bringing that application down causes Apache to return an unhelpful message like &quot;Service unavailable&quot; to the client, as its attempt to reverse proxy the connection to the internal service fails.&lt;br /&gt;&lt;br /&gt;For a long while I've wanted mod_proxy to be smarter, where I could tell it &quot;hey, if the normal service you are forwarding to is not available, forward to this one instead&quot;. And &quot;this one&quot; would simply be the the same service running on a different peer server.&lt;br /&gt;&lt;br /&gt;Well, that is exactly what &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html&quot; rel=&quot;nofollow&quot;&gt;mod_proxy_balancer&lt;/a&gt; in Apache 2.2 allows you to do.  It goes beyond that and can provide weighted load balancing of internal services, but it also allows you to define &quot;hot spares&quot; which are only used if the normal service(s) are unavailable.  This is what I'm using, with a config like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
# Reverse Proxy /myapp to an internal web service, with fail-over to a hot standby
&amp;lt;Proxy balancer://myappcluster&amp;gt;
    BalancerMember http://127.0.0.1:7825
    # the hot standby on server2
    BalancerMember http://10.0.0.2:7825 status=+H
&amp;lt;/Proxy&amp;gt;
&amp;lt;Location /myapp&amp;gt;
    ProxyPass           balancer://myappcluster
    ProxyPassReverse    http://127.0.0.1:7825
    ProxyPassReverse    http://10.0.0.2:7825
&amp;lt;/Location&amp;gt;
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This config tells Apache to proxy requests for /myapp to a web service on localhost at &lt;a href=&quot;http://127.0.0.1:7825&quot; rel=&quot;nofollow&quot;&gt;http://127.0.0.1:7825&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If that service becomes unavailable (ie: you take it down for maintenance) then it will automatically send requests to &lt;a href=&quot;http://10.0.0.2:7825&quot; rel=&quot;nofollow&quot;&gt;http://10.0.0.2:7825&lt;/a&gt; instead.  The &quot;status=+H&quot; defines that member as a Hot Standby.  When the default service is back on-line mod_proxy_balancer will pick that up within about 60 seconds or so and revert back to forwarding all requests to it.&lt;br /&gt;&lt;br /&gt;The ProxyPassReverse directives are unrelated to the proxy balancing smarts, but are usually required if you want to handle redirects/etc properly.&lt;br /&gt;&lt;br /&gt;You can also get real load balancing if you define some BalancerMember entries that aren't hot standbys.  mod_proxy_balancer will balance requests across them and hot standby members won't be used until all normal members become unavailable.  You can control the weighting of members and the balancing method to, if you like.  See &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass&quot; rel=&quot;nofollow&quot;&gt;proxypass&lt;/a&gt; and &lt;a href=&quot;http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html&quot; rel=&quot;nofollow&quot;&gt;mod_proxy_balancer&lt;/a&gt; docs.</content>
		<author>
			<name>Chris Miles</name>
			<uri>http://chrismiles.livejournal.com/</uri>
		</author>
		<source>
			<title type="html">CM | tech &amp;gt;&amp;gt; LJ</title>
			<subtitle type="html">Chris Miles</subtitle>
			<link rel="self" href="http://chrismiles.livejournal.com/data/atom"/>
			<id>urn:lj:livejournal.com:atom1:chrismiles</id>
			<updated>2012-01-20T00:22:35+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">chrismiles @ 2008-08-20T16:30:00</title>
		<link href="http://chrismiles.livejournal.com/24981.html"/>
		<id>urn:lj:livejournal.com:atom1:chrismiles:24981</id>
		<updated>2011-08-09T10:21:04+00:00</updated>
		<content type="html">When designing the &lt;a href=&quot;http://www.flvio.com/mediakit_overview&quot; rel=&quot;nofollow&quot;&gt;FLVio RESTful HTTP API&lt;/a&gt; I ended up choosing XHTML as the data representation format.  My natural instinct was to use XML and invent my own schema, but &lt;a href=&quot;http://oreilly.com/catalog/9780596529260/&quot; rel=&quot;nofollow&quot;&gt;RESTful Web Services&lt;/a&gt; convinced me otherwise.&lt;br /&gt;&lt;br /&gt;While explaining to a customer today about simply using a web browser to help debug the API I said,&lt;br /&gt;&lt;br /&gt;  &lt;i&gt;&quot;It is no coincidence that we use XHTML to represent data as it is not only a well-understood XML format but also makes life much easier when debugging.&quot;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Which has proven itself true so far.  Any browser becomes a debugging tool for the API. Although, until browsers support all the HTTP verbs (or XHTML5 / Web Forms 2.0) you'll need an addon like &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/2691&quot; rel=&quot;nofollow&quot;&gt;Poster&lt;/a&gt; for Firefox to test commands like PUT and DELETE.</content>
		<author>
			<name>Chris Miles</name>
			<uri>http://chrismiles.livejournal.com/</uri>
		</author>
		<source>
			<title type="html">CM | tech &amp;gt;&amp;gt; LJ</title>
			<subtitle type="html">Chris Miles</subtitle>
			<link rel="self" href="http://chrismiles.livejournal.com/data/atom"/>
			<id>urn:lj:livejournal.com:atom1:chrismiles</id>
			<updated>2012-01-20T00:22:35+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">mock 0.8 beta 2:bug fix and side_effect iterables</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/fopkqgO3KHs/arch_d7_2011_07_30.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/fopkqgO3KHs/arch_d7_2011_07_30.shtml</id>
		<updated>2011-08-04T10:48:24+00:00</updated>
		<content type="html">I've released mock 0.8 beta 2. You can download it it or install it with: pip install -U mock==dev mock is a library for testing in Python. ... [459 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=fopkqgO3KHs:i-qSrshnkm8:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=fopkqgO3KHs:i-qSrshnkm8:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=fopkqgO3KHs:i-qSrshnkm8:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=fopkqgO3KHs:i-qSrshnkm8:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=fopkqgO3KHs:i-qSrshnkm8:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=fopkqgO3KHs:i-qSrshnkm8:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=fopkqgO3KHs:i-qSrshnkm8:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/fopkqgO3KHs&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Eddie 0.37.2 released</title>
		<link href="http://chrismiles.livejournal.com/25316.html"/>
		<id>urn:lj:livejournal.com:atom1:chrismiles:25316</id>
		<updated>2011-07-31T14:07:31+00:00</updated>
		<content type="html">&lt;a href=&quot;http://eddie-tool.net/&quot; rel=&quot;nofollow&quot;&gt;Eddie&lt;/a&gt; 0.37.2 has been released. The big change is that Eddie is now a properly installable Python package. This allows it to be distributed in package format and can be very easily installed using &quot;easy_install EDDIE-Tool&quot;. Other bugfixes and minor improvements are also included. &lt;a href=&quot;http://dev.eddie-tool.net/trac/browser/eddie/trunk/doc/CHANGES.txt&quot; rel=&quot;nofollow&quot;&gt;CHANGELOG&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://pypi.python.org/pypi/EDDIE-Tool&quot; rel=&quot;nofollow&quot;&gt;Download Eddie&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you haven't heard of it before, Eddie is a multi-platform monitoring tool developed in &lt;a href=&quot;http://www.python.org/&quot; rel=&quot;nofollow&quot;&gt;Python&lt;/a&gt;.</content>
		<author>
			<name>Chris Miles</name>
			<uri>http://chrismiles.livejournal.com/</uri>
		</author>
		<source>
			<title type="html">CM | tech &amp;gt;&amp;gt; LJ</title>
			<subtitle type="html">Chris Miles</subtitle>
			<link rel="self" href="http://chrismiles.livejournal.com/data/atom"/>
			<id>urn:lj:livejournal.com:atom1:chrismiles</id>
			<updated>2012-01-20T00:22:35+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">PyCon UK 2011</title>
		<link href="http://ramblings.timgolden.me.uk/2011/07/28/pycon-uk-2011/"/>
		<id>http://ramblings.timgolden.me.uk/2011/07/28/pycon-uk-2011/</id>
		<updated>2011-07-28T11:52:53+00:00</updated>
		<content type="html">&lt;p&gt;Well, the &lt;a href=&quot;http://www.pywm.eu/&quot;&gt;West Midlands Python&lt;/a&gt; team have been busy&amp;#8230; (at least, I assume it&amp;#8217;s them). This year&amp;#8217;s &lt;a href=&quot;http://pyconuk.org/&quot;&gt;UK Python conference&lt;/a&gt; is taking place over the weekend of the 24th - 25th September in Coventry. (Which is fairly central in England, for those of you reading this in a foreign language). I&amp;#8217;ve just booked my place and a night in the hotel. I hope can rustle up a talk or workshop to make it even more worthwhile.&lt;/p&gt;
&lt;p&gt;It looks to be a bit more casually organised than other conferences and I&amp;#8217;m very much hoping that the always friendly atmosphere will be even more friendly&amp;#8230; See you there, I hope!&lt;/p&gt;</content>
		<author>
			<name>Tim Golden</name>
			<uri>http://ramblings.timgolden.me.uk</uri>
		</author>
		<source>
			<title type="html">Moderate Realism » Tech</title>
			<subtitle type="html">The ramblings of Tim Golden</subtitle>
			<link rel="self" href="http://ramblings.timgolden.me.uk/category/tech/feed"/>
			<id>http://ramblings.timgolden.me.uk/category/tech/feed</id>
			<updated>2012-02-03T12:22:08+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">mock 0.8 beta 1: easier asserts for multiple and chained calls</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/UPMheRcfhkk/arch_d7_2011_07_23.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/UPMheRcfhkk/arch_d7_2011_07_23.shtml</id>
		<updated>2011-07-25T11:02:01+00:00</updated>
		<content type="html">I've released mock 0.8 beta 1. You can download it it or install it with: pip install -U mock==dev mock is a library for testing in Python. ... [1376 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=UPMheRcfhkk:2tdiZqjE5l0:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=UPMheRcfhkk:2tdiZqjE5l0:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=UPMheRcfhkk:2tdiZqjE5l0:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=UPMheRcfhkk:2tdiZqjE5l0:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=UPMheRcfhkk:2tdiZqjE5l0:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=UPMheRcfhkk:2tdiZqjE5l0:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=UPMheRcfhkk:2tdiZqjE5l0:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/UPMheRcfhkk&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">High Performance Python tutorial v0.2 (from EuroPython 2011)</title>
		<link href="http://ianozsvald.com/2011/07/25/high-performance-python-tutorial-v0-2-from-europython-2011/"/>
		<id>http://ianozsvald.com/?p=1190</id>
		<updated>2011-07-25T08:42:25+00:00</updated>
		<content type="html">&lt;p&gt;My updated &lt;a title=&quot;High Speed &amp;amp; Performance Python tutorial &quot; href=&quot;http://ianozsvald.com/HighPerformancePythonfromTrainingatEuroPython2011_v0.2.pdf&quot;&gt;High Performance Python tutorial&lt;/a&gt; is now available as a 55 page PDF. The goal is to take you on several journeys which show you different ways of making Python code run much faster (up to 75* on the CPU, faster with a GPU).&lt;/p&gt;
&lt;p&gt;This is an update to the 49 page &lt;a href=&quot;http://ianozsvald.com/2011/06/29/high-performance-python-tutorial-v0-1-from-my-4-hour-tutorial-at-europython-2011/&quot;&gt;v0.1&lt;/a&gt; I published three weeks ago after running the tutorial at EuroPython 2011 in Florence.&lt;/p&gt;
&lt;p&gt;Topics covered:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Python profiling (cProfile, RunSnake, line_profiler) – find bottlenecks&lt;/li&gt;
&lt;li&gt;PyPy – Python’s new Just In Time compiler, a note on the new numpy module&lt;/li&gt;
&lt;li&gt;Cython – annotate your code and compile to C&lt;/li&gt;
&lt;li&gt;numpy integration with Cython – fast numerical Python library wrapped by Cython&lt;/li&gt;
&lt;li&gt;ShedSkin – automatic code annotation and conversion to C&lt;/li&gt;
&lt;li&gt;numpy vectors – fast vector operations using numpy arrays&lt;/li&gt;
&lt;li&gt;NumExpr on numpy vectors – automatic numpy compilation to multiple CPUs and vector units&lt;/li&gt;
&lt;li&gt;multiprocessing – built-in module to use multiple CPUs&lt;/li&gt;
&lt;li&gt;ParallelPython – run tasks on multiple computers&lt;/li&gt;
&lt;li&gt;pyCUDA – run tasks on your Graphics Processing Unit&lt;/li&gt;
&lt;li&gt;Other algorithmic choices and options you have&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The improvement over the last version (v0.1) is that I&amp;#8217;ve filled in all the sections now including pyCUDA (there are still a few IAN_TODOs marked, I hope to finish these in a future v0.3). I&amp;#8217;ve also added a short section on Algorithmic Choices, link to the new Cython prange operator and show the new numpy module in PyPy.&lt;/p&gt;
&lt;p&gt;The source code is on my &lt;a href=&quot;https://github.com/ianozsvald/EuroPython2011_HighPerformanceComputing&quot;&gt;github&lt;/a&gt; page. The original slides are on &lt;a href=&quot;http://www.slideshare.net/IanOzsvald/euro-python2011-high-performance-python&quot;&gt;slideshare&lt;/a&gt; too. If you&amp;#8217;re after a challenge then at the end of the report I suggest some ported versions of the code that I&amp;#8217;d like to see.&lt;/p&gt;
&lt;p&gt;The report is licensed Creative Commons by Attribution (please link back here) &amp;#8211; I&amp;#8217;ll also happily accept a beer if you meet me in person! If you&amp;#8217;re curious about this sort of work then note that I offer A.I. and high performance computing consulting and training via my &lt;a href=&quot;http://morconsulting.com/&quot;&gt;Mor Consulting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; &amp;#8211; ShedSkin 0.9 adds faster complex number support. I haven&amp;#8217;t added it to the report yet, evidence in the &lt;a href=&quot;http://groups.google.com/group/shedskin-discuss/browse_thread/thread/aab757f6fb282794&quot;&gt;ShedSkin Group&lt;/a&gt; suggests it gets closer to the non-complex-number version (i.e. you don&amp;#8217;t have to do more work but you get a nice speed boost whilst still using complex numbers).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update (Nov 2011)&lt;/strong&gt; &amp;#8211; Antonio and Armin posted a &lt;a href=&quot;http://mail.libexpat.org/pipermail/pypy-dev/2011-November/008726.html&quot;&gt;note&lt;/a&gt; which explains some of the slowness in PyPy and show how it is competitive, under the right conditions. Armin also contributed a C version which shows PyPy to run as fast as C (for their chosen configuration).&lt;/p&gt;
&lt;hr /&gt;
Ian applies Artificial Intelligence as an Artificial Intelligence Researcher for companies (&lt;a href=&quot;http://morconsulting.com&quot; title=&quot;Artificial Intelligence consultant&quot;&gt;Mor Consulting&lt;/a&gt;), co-founded the &lt;a href=&quot;http://strongsteam.com&quot; title=&quot;Artificial Intelligence toolkit&quot;&gt;StrongSteam&lt;/a&gt; A.I. datamining toolkit, co-authored &lt;a href=&quot;http://socialtiesapp.com/&quot; title=&quot;Social Ties social discovery tool for conferences and events&quot;&gt;SocialTies&lt;/a&gt;, programs Python, writes &lt;a href=&quot;http://TheScreencastingHandbook.com&quot; title=&quot;Screencasting Tutorial eBook&quot;&gt;The Screencasting Handbook&lt;/a&gt; and is also a sea-side dweller and consumer of fine coffees.</content>
		<author>
			<name>Ian Ozsvald</name>
			<uri>http://ianozsvald.com</uri>
		</author>
		<source>
			<title type="html">Entrepreneurial Geekiness » Python</title>
			<subtitle type="html">My thoughts on screencasting, the A.I. Cookbook and high-tech entrepreneurship</subtitle>
			<link rel="self" href="http://ianozsvald.com/category/python/feed/"/>
			<id>http://ianozsvald.com/category/python/feed/</id>
			<updated>2012-02-02T08:22:24+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Mock subclasses and their attributes</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/Ck3ZkmgamRU/arch_d7_2011_07_16.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/Ck3ZkmgamRU/arch_d7_2011_07_16.shtml</id>
		<updated>2011-07-18T17:22:00+00:00</updated>
		<content type="html">This blog entry is about creating subclasses of mock.Mock. mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects. ... [341 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=Ck3ZkmgamRU:ccaZq9Y2zBE:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=Ck3ZkmgamRU:ccaZq9Y2zBE:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=Ck3ZkmgamRU:ccaZq9Y2zBE:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=Ck3ZkmgamRU:ccaZq9Y2zBE:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=Ck3ZkmgamRU:ccaZq9Y2zBE:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=Ck3ZkmgamRU:ccaZq9Y2zBE:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=Ck3ZkmgamRU:ccaZq9Y2zBE:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/Ck3ZkmgamRU&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Upcoming speaking event @ JAX London</title>
		<link href="http://feedproxy.google.com/~r/Magpiebrain/~3/zSNEOAPnonU/"/>
		<id>http://www.magpiebrain.com/?p=1114</id>
		<updated>2011-07-16T18:27:37+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;#8217;ll be speaking on the cloud track at JAX London 2011. The talk &amp;#8220;&lt;a href=&quot;http://jaxlondon.com/2011/sessions/?tid=2174&quot;&gt;Private Cloud, A Convenient Fiction&lt;/a&gt;&amp;#8221; attempts to puncture some of the FUD on the subject. The nuances between various hosting solutions are many and varied, and don&amp;#8217;t suit being put into neat boxes like &amp;#8216;public&amp;#8217; and &amp;#8216;private&amp;#8217;. When I talk to clients about what is right to them, the types of things we discuss place different providers on a number of axis, which I hope to get across in this talk.&lt;/p&gt;
&lt;p&gt;As always, you can track the conference (or note that you plan to attend) at Simon &amp;#038; Nat&amp;#8217;s startup &lt;a href=&quot;http://lanyrd.com/2011/jax-london-autumn/&quot;&gt;Lanyrd&lt;/a&gt;, which is several shades of awesome. &lt;/p&gt;
&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=zSNEOAPnonU:CKPsXQX6nAY:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=zSNEOAPnonU:CKPsXQX6nAY:7Q72WNTAKBA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=7Q72WNTAKBA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=zSNEOAPnonU:CKPsXQX6nAY:D7DqB2pKExk&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?i=zSNEOAPnonU:CKPsXQX6nAY:D7DqB2pKExk&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=zSNEOAPnonU:CKPsXQX6nAY:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<author>
			<name>Sam Newman</name>
			<uri>http://www.magpiebrain.com</uri>
		</author>
		<source>
			<title type="html">Magpiebrain</title>
			<link rel="self" href="http://feeds.feedburner.com/Magpiebrain"/>
			<id>http://feeds.feedburner.com/Magpiebrain</id>
			<updated>2012-02-05T00:22:04+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Mock 0.8 alpha 2: patch.multiple, new_callable and non-callable mocks</title>
		<link href="http://feedproxy.google.com/~r/voidspace/~3/3rSCOSKDPfo/arch_d7_2011_07_16.shtml"/>
		<id>http://feedproxy.google.com/~r/voidspace/~3/3rSCOSKDPfo/arch_d7_2011_07_16.shtml</id>
		<updated>2011-07-16T15:36:19+00:00</updated>
		<content type="html">I've released mock 0.8 alpha 2. You can download it it or install it with: pip install -U mock==dev mock is a library for testing in Python. ... [496 words]&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=3rSCOSKDPfo:B2h8V-gpbsU:F7zBnMyn0Lo&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=3rSCOSKDPfo:B2h8V-gpbsU:F7zBnMyn0Lo&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=3rSCOSKDPfo:B2h8V-gpbsU:V_sGLiPBpWU&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=3rSCOSKDPfo:B2h8V-gpbsU:V_sGLiPBpWU&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=3rSCOSKDPfo:B2h8V-gpbsU:gIN9vFwOqvQ&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?i=3rSCOSKDPfo:B2h8V-gpbsU:gIN9vFwOqvQ&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/voidspace?a=3rSCOSKDPfo:B2h8V-gpbsU:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/voidspace?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/voidspace/~4/3rSCOSKDPfo&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Fuzzyman</name>
			<uri>http://www.voidspace.org.uk/python/weblog/index.shtml</uri>
		</author>
		<source>
			<title type="html">The Voidspace Techie Blog</title>
			<subtitle type="html">Python Programming, news on the Voidspace Python Projects and all things techie.</subtitle>
			<link rel="self" href="http://feeds.feedburner.com/voidspace"/>
			<id>http://feeds.feedburner.com/voidspace</id>
			<updated>2012-01-22T16:22:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Django testing 201 : Acceptance Tests vs Unit Tests</title>
		<link href="http://tartley.com/?p=1337"/>
		<id>http://tartley.com/?p=1337</id>
		<updated>2011-07-14T15:19:43+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;#8217;m finding that our Django project&amp;#8217;s tests fall into an uncomfortable middle-ground, halfway between end-to-end acceptance tests and proper unit tests. As such they don&amp;#8217;t exhibit the best qualities of either. I&amp;#8217;d like to fix this.&lt;/p&gt;
&lt;p&gt;We&amp;#8217;re testing our Django application in what I believe is the canonical way, as described by the &lt;a href=&quot;https://docs.djangoproject.com/en/dev/topics/testing/&quot;&gt;excellent documentation&lt;/a&gt;. We have a half-dozen Django applications, with a mixture of &lt;code&gt;unittest.TestCase&lt;/code&gt; and &lt;code&gt;django.test.TestCase&lt;/code&gt; subclasses in each application&amp;#8217;s tests.py module. They generally use fixtures or the Django ORM to set up data for the test, then invoke the function-under-test, and then make assertions about return values or side-effects, often using the ORM again to assert about the new state of the database.&lt;/p&gt;
&lt;h2&gt;Not an Acceptance Test&lt;/h2&gt;
&lt;p&gt;Such a test doesn&amp;#8217;t provide the primary benefit of an acceptance test, namely proof that the application actually works, because it isn&amp;#8217;t quite end-to-end enough. Instead of calling methods-under-test, we should be using the Django testing client to make HTTP requests to our web services, and maybe incorporating Selenium tests to drive our web UI. This change is a lot of work, but at least the path forward seems clear.&lt;/p&gt;
&lt;p&gt;However, an additional problem is that acceptance tests ought to be associated with features that are visible to an end user. A single user story might involve calls to several views, potentially spread across different Django apps. Because of this, I don&amp;#8217;t think it&amp;#8217;s appropriate for an acceptance test to live within a single Django app&amp;#8217;s directory.&lt;/p&gt;
&lt;h2&gt;Not a Unit Test&lt;/h2&gt;
&lt;p&gt;On the other hand, our existing tests are also not proper unit tests. They hit the (test) database and the filesystem, and they currently don&amp;#8217;t do any mocking out of expensive or complicated function calls. As a result, they are slow to run, and will only get slower as we ramp up our feature set and our test coverage. This is a cardinal sin for unit tests, and it discourages developers from running the tests frequently enough. In addition, tests like this often require extensive setup of test data, and are therefore hard to write, so it&amp;#8217;s very labour-intensive to provide adequate test coverage.&lt;/p&gt;
&lt;h2&gt;My Solution&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;1) I&amp;#8217;ve created a top-level acceptancetests directory.&lt;/strong&gt; Most of our  current tests will be moved into this directory, because they are closer  to acceptance tests than unit tests, and will gradually be modified to  be more end-to-end.&lt;/p&gt;
&lt;p&gt;These acceptance tests need to be run by the Django testrunner,  since they rely on lots of things that it does, such as creating the  test database and rolling back after each test method. However, the Django testrunner won&amp;#8217;t find these tests unless I make &amp;#8216;acceptancetests&amp;#8217; a new Django application, and import all acceptance test classes into its tests.py. I&amp;#8217;m considering doing this, but for the moment I have another solution, which I&amp;#8217;ll describe in a moment.&lt;/p&gt;
&lt;p&gt;We also need to be able to create unit tests for all of our code, regardless of whether that code is within a Django model, or somewhere else in a Django app, or in another top-level directory that isn&amp;#8217;t a Django app. Such unit tests should live in a &amp;#8216;tests&amp;#8217; package right next to the code they test. I&amp;#8217;m puzzled as to why Django&amp;#8217;s testrunner doesn&amp;#8217;t look for unit tests throughout the project and just run them all, along with the Django-specific tests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2) My solution to this is to augment the Django test runner&lt;/strong&gt;, by inheriting from it. My test runner, instead of just looking for tests in each app&amp;#8217;s models.py and tests.py, looks for subclasses of unittest.TestCase in every module throughout the whole project. Setting Django&amp;#8217;s settings.TEST_RUNNER causes this custom test runner to be used by &amp;#8216;manage.py test&amp;#8217;. Thanks to the Django contributors for this flexibility!&lt;/p&gt;
&lt;p&gt;So the new test runner finds and runs all the tests which the default Django runner runs, and it also finds our unit tests from all over the project, and it also includes our new top-level &amp;#8216;acceptancetests&amp;#8217; directory. This is great!&lt;/p&gt;
&lt;p&gt;One surprise is that the number of tests which get run has actually decreased. On closer inspection, this is because the standard Django test runner includes all the tests for every Django app, and this includes not just my project&amp;#8217;s apps, but also the built-in and middleware Django apps. We are no longer running these tests. Is this important? I&amp;#8217;m not sure: After all, we are not modifying the code in django.contrib, so I don&amp;#8217;t expect these tests to start failing. On the other hand, maybe those tests help to demonstrate that our Django settings are not broken?&lt;/p&gt;
&lt;h2&gt;An appeal for sanity&lt;/h2&gt;
&lt;p&gt;My solutions seem to work, but I&amp;#8217;m suspicious that I&amp;#8217;m swimming against the current, because I haven&amp;#8217;t found much discussion about these issues, so maybe I&amp;#8217;m just well off the beaten path. Have many other people already written a similar extension to Django&amp;#8217;s test runner? If so, where are they all? If not, why not? How else is everyone running their Django project tests in locations other than models.py or tests.py? Or do they not have tests outside these locations? If not, why not? I&amp;#8217;d love to hear about it if I&amp;#8217;m doing it wrong, or if there&amp;#8217;s an easier approach.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update: &lt;/strong&gt;My &lt;a href=&quot;http://rangespan.com/&quot;&gt;fabulous employer&lt;/a&gt; has given permission to release the test runner as open source:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/rangespan/django-alltestsrunner&quot;&gt;https://github.com/rangespan/django-alltestsrunner&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update2:&lt;/strong&gt; I like this post&amp;#8217;s numeric ID (check the URL)&lt;/p&gt;</content>
		<author>
			<name>Jonathan Hartley</name>
			<uri>http://tartley.com</uri>
		</author>
		<source>
			<title type="html">tartley.com</title>
			<subtitle type="html">It has been said that a website devoted to oneself is the greatest act of hubris. Welcome aboard...</subtitle>
			<link rel="self" href="http://tartley.com/?feed=rss2"/>
			<id>http://tartley.com/?feed=rss2</id>
			<updated>2011-12-06T10:22:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Apache and the case of the missing memory</title>
		<link href="http://feedproxy.google.com/~r/Magpiebrain/~3/HUUUofPctCc/"/>
		<id>http://www.magpiebrain.com/?p=1106</id>
		<updated>2011-07-13T11:26:40+00:00</updated>
		<content type="html">&lt;p&gt;It seems I &lt;a href=&quot;http://www.magpiebrain.com/2011/07/12/tracking-down-rogue-processes/&quot;&gt;spoke too soon&lt;/a&gt;. Just one day after thinking I had tracked down the source of the trouble, and yesterday evening brought another outage. The graph in CloudWatch was all too familiar, showing the huge uptick in CPU use. The box was again unresponsive and had to be restarted. Checking &lt;code&gt;cpu_log&lt;/code&gt; for a likely culprit, the entries looked odd:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; light: true; title: ; notranslate&quot;&gt;
2011-07-13 00:12:22 www-data 26096 21.4  0.9 160732  5972 ?        D    Jul12   5:30 /usr/sbin/apache2 -k start
2011-07-13 00:12:25 www-data 26096 21.4  0.9 160736  6040 ?        R    Jul12   5:30 /usr/sbin/apache2 -k start
2011-07-13 00:12:22 www-data 26096 21.3  0.9 160732  5972 ?        D    Jul12   5:30 /usr/sbin/apache2 -k start
2011-07-13 00:12:22 root     26179 24.0  0.0   4220   584 ?        S    00:12   0:00 /bin/sh /home/ubuntu/tools/cpu_log
&lt;/pre&gt;
&lt;p&gt;No entries from Postfix &amp;#8211; good &amp;#8211; but now other processes are having trouble. This was starting to point away from one rogue process gobbling CPU, to high CPU use being a symptom of something else. What can cause very high CPU use? Among other things, swapping memory. A process chewing up all available memory could easily cause these kinds of symptoms. A quick scan through &lt;code&gt;syslog&lt;/code&gt; showed me something I should have spotted earlier. If it wasn&amp;#8217;t the smoking gun, then at least something pretty close:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; light: true; title: ; notranslate&quot;&gt;
Jul 13 00:11:28 domU-12-31-39-01-F0-E5 kernel: [38837.985499] apache2 invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
&lt;/pre&gt;
&lt;p&gt;This doesn&amp;#8217;t mean that Apache is to blame, just that it was a process which oom-killer tried to take out in order to free up memory. And just prior to the outage itself in the apache logs:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; light: true; title: ; notranslate&quot;&gt;
[Tue Jul 12 23:48:24 2011] [error] (12)Cannot allocate memory: fork: Unable to fork new process
&lt;/pre&gt;
&lt;p&gt;At this point my mind was already turning to the fact that I hadn&amp;#8217;t done *any* tuning of Apache processes or PHP. After googling around for a bit, a few things looked wrong in my config. Here was the untuned default that Ubuntu gave me:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; light: true; title: ; notranslate&quot;&gt;
&amp;lt;IfModule mpm_prefork_module&amp;gt;
    StartServers            5
    MinSpareServers         5
    MaxSpareServers        10
    MaxClients            150
    MaxRequestsPerChild     0
&amp;lt;/IfModule&amp;gt;
&lt;/pre&gt;
&lt;p&gt;In general &lt;code&gt;MaxClients&lt;/code&gt; refers to the maximum number of simultaneous requests that will be served. On prefork Apache, like mine, &lt;code&gt;MaxClients&lt;/code&gt; also refers to the max number of child processes that get spawned. A simple &lt;code&gt;ps&lt;/code&gt; showed that even after a restart, each apache process was consuming up to 35MB of memory. The host in question has 1GB in RAM &amp;#8211; it was clear that even with nothing else running on the box, with that sort of memory footprint I would exhaust memory way before the &lt;code&gt;MaxClients&lt;/code&gt; threshold was reached. Even more worrying, the &lt;code&gt;MaxRequestsPerChild&lt;/code&gt; was set to zero, meaning that the child processes would never be restarted. If a memory leak was occurring inside the child Apache process, it could carry on eating memory until the box comes crashing to it&amp;#8217;s knees. After some quick maths I decided to reduce my &lt;code&gt;MaxClients&lt;/code&gt; down to a more manageable 25, but also set &lt;code&gt;MaxRequestsPerChild&lt;/code&gt; to 1000. My hope is that this may buy me some more time to try and track down where the memory use is occurring.&lt;/p&gt;
&lt;p&gt;This has spurned me on to finally invest some time looking at nginx. This weekend may see me putting in nginx side by side with a view to moving away from Apache &amp;#8211; from all reports this may allow me to run my sites with a much lower footprint. But if the last couple of days has taught me anything, it&amp;#8217;s that I should be so sure to rush to the conclusion that I&amp;#8217;ve finally tracked this problem down. If I&amp;#8217;m still having trouble at the weekend, I may well just clone the box and try and reproduce the problem with some performance tests.&lt;/p&gt;
&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=HUUUofPctCc:OhmwsJ3-noI:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=HUUUofPctCc:OhmwsJ3-noI:7Q72WNTAKBA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=7Q72WNTAKBA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=HUUUofPctCc:OhmwsJ3-noI:D7DqB2pKExk&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?i=HUUUofPctCc:OhmwsJ3-noI:D7DqB2pKExk&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=HUUUofPctCc:OhmwsJ3-noI:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<author>
			<name>Sam Newman</name>
			<uri>http://www.magpiebrain.com</uri>
		</author>
		<source>
			<title type="html">Magpiebrain</title>
			<link rel="self" href="http://feeds.feedburner.com/Magpiebrain"/>
			<id>http://feeds.feedburner.com/Magpiebrain</id>
			<updated>2012-02-05T00:22:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Childish Behavior</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/qSPqEzbJ_PU/childish-behavior.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-6183569737885912384</id>
		<updated>2011-07-13T01:57:53+00:00</updated>
		<content type="html">A member of the PSF wrote to the Board to ask whether we thought the name of a particular package on the &lt;a href=&quot;http://pypi.python.org/pypi&quot;&gt;Cheese Shop&lt;/a&gt;&amp;nbsp;was offensive, and if so whether we felt something should be done about it. This stimulated one of the more interesting recent Board discussions, in which we were even joined by the President (so you know how seriously such matters are taken at the PSF: normally Guido just lets Board business pass by, having many other demands on his time).&lt;br /&gt;
&lt;br /&gt;
The general feeling was that the package name &lt;i&gt;was&lt;/i&gt;&amp;nbsp;offensive, but that unless we were faced with a legal request to remove content (as we have, very occasionally, from time to time, and with which we normally comply at some inconvenience to ourselves) we did not feel it was our place to police standards of decency on behalf of PyPi users. Censorship is a slippery slope, and can lead you into liability which transparency might not.&lt;br /&gt;
&lt;br /&gt;
Given that I have done my best to encourage diversity, including gender diversity, among the international Python community, however, and even though I have on occasion been &lt;i&gt;that guy&lt;/i&gt;, (as I suspect many of us have), it seems to me that if we truly want more women to feel at home in the open source software industry then we really ought to avoid giving our projects names like &lt;i&gt;&lt;a href=&quot;http://pypi.python.org/pypi/pantyshot&quot;&gt;pantyshot&lt;/a&gt;&lt;/i&gt;. I was somewhat surprised by the name (for a piece of software that parses the MarkDown language?) until I saw that the author of that package had implemented the &lt;i&gt;&lt;a href=&quot;https://github.com/tanoku/upskirt&quot;&gt;upskirt&lt;/a&gt;&lt;/i&gt;&amp;nbsp;MarkDown parser. WTF? Perhaps I am missing something here, but when I ask Google what that means, it replies in somewhat unequivocal terms:&lt;br /&gt;
&lt;blockquote&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Upskirt is a term usually referring to &lt;i&gt;up skirt photography&lt;/i&gt;, images of the view up a woman's skirt (as seen from underneath), including shots of a woman's underwear or crotch, or exposing her vulva or buttocks. Alternatively, an &quot;upskirt&quot; may be a video, an illustration, or simply a view...&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;If you want to read any more I will leave you to do the research yourself. But the question it raises in my mind is: &quot;What immature hooligan decided it would be a good idea to call a MarkDown parser &lt;i&gt;upskirt&lt;/i&gt;?&quot; Is that such an unreasonable question? Is there some rationale so obvious that all but me can see it?&lt;br /&gt;
&lt;br /&gt;
It's coming up to July 4, so I hope that date's association with freedoms is strong enough (in American minds, at least) that the Foundation will be supported in its stance against censorship. But even though we agree so much with free speech that we will fight for your right to call your pissy little parser &lt;i&gt;pantyshot&lt;/i&gt;&amp;nbsp;or &lt;i&gt;upskirt&lt;/i&gt;,&amp;nbsp;we really would rather you grew up and called it something else. Don't you realize? Not only do you make the open source ecosphere hostile to women, you also show yourselves as hostile to the diversity of the ecosphere. That's not OK with me. Sorry.&lt;br /&gt;
&lt;br /&gt;
If I am wrong, and I have overlooked some obvious (or even not-so-obvious) support for gender equality that is hidden in these package names then I would be grateful for the enlightenment. If this is just another juvenile set of geeks sniggering in a router closet somewhere about toilet language then &lt;i&gt;yawn&lt;/i&gt;, I guess. I've got better things to do with my time than deal with that kind of stupidity.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;DISCLAIMER [added July 2, 2011] This post was not intended as an official statement on behalf of the Python Software Foundation, but rather to give an insight into its decision making process. My personal distate for these particular names is heightened because it appears that the original&amp;nbsp;&lt;i&gt;libupskirt&lt;/i&gt;&amp;nbsp;author's acceptance on trust of a foreign-language name for her library has caused her considerable discomfort and possibly harassment [EDIT July 12: apparently the primary issue was the way the development process was used to remove her identity from contributed code]. She apparently no longer wishes to work on open source.&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-6183569737885912384?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=qSPqEzbJ_PU:OePRwz_8gkI:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=qSPqEzbJ_PU:OePRwz_8gkI:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=qSPqEzbJ_PU:OePRwz_8gkI:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/qSPqEzbJ_PU&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Python 3.0 on Mac OS X with readline</title>
		<link href="http://chrismiles.livejournal.com/25648.html"/>
		<id>urn:lj:livejournal.com:atom1:chrismiles:25648</id>
		<updated>2011-07-12T23:37:09+00:00</updated>
		<content type="html">&lt;a href=&quot;http://www.python.org/download/releases/3.0/&quot; rel=&quot;nofollow&quot;&gt;Python 3.0&lt;/a&gt; is out now and even though an OS X package isn't available yet, it is easy to build from source on a Mac.  However, without some tweaking, you usually end up with a Python interpreter that lacks line-editing capabilities.  You know, using cursor keys to edit the command-line and access history.  The problem is that Apple doesn't provide a &lt;a href=&quot;http://en.wikipedia.org/wiki/GNU_readline&quot; rel=&quot;nofollow&quot;&gt;readline&lt;/a&gt; library (due to licensing issues they offer a functionally similar but different library called &lt;a href=&quot;http://www.thrysoee.dk/editline/&quot; rel=&quot;nofollow&quot;&gt;editline&lt;/a&gt;) so by default Python builds without readline support and hence no editing/history support.  This always frustrates me.&lt;br /&gt;&lt;br /&gt;Luckily, this is easily fixed so keep reading.&lt;br /&gt;&lt;br /&gt;You can tell when readline isn't going to be included by examining the end of the make output.  You will see something like this:&lt;br /&gt;&lt;pre&gt;Failed to find the necessary bits to build these modules:
_gdbm              ossaudiodev        readline        
spwd                                                  
To find the necessary bits, look in setup.py in detect_modules() for the module's name.&lt;/pre&gt;&lt;br /&gt;The steps below detail my method for adding readline (and gdbm which you can skip if you don't want it) support to Python 3.0 (this probably works with other Python versions too).&lt;br /&gt;&lt;br /&gt;Firstly, install the readline and gdbm libraries.  One of the easiest ways to do that is to use &lt;a href=&quot;http://www.macports.org/&quot; rel=&quot;nofollow&quot;&gt;MacPorts&lt;/a&gt; (aka DarwinPorts).  If you don't have it already you can download the &lt;a href=&quot;http://www.macports.org/install.php&quot; rel=&quot;nofollow&quot;&gt;MacPorts installer&lt;/a&gt; to set things up.  Once that is done then open Terminal/iTerm and enter:&lt;br /&gt;&lt;pre&gt;$ sudo port install readline
$ sudo port install gdbm&lt;/pre&gt;&lt;br /&gt;If that works, then you are ready to build Python.  Get the &lt;a href=&quot;http://www.python.org/download/releases/3.0/&quot; rel=&quot;nofollow&quot;&gt;Python 3.0 source code&lt;/a&gt; and unpack it.  You need to tell setup.py where to find the libraries you installed.  MacPorts (usually) installs all of the software it manages in /opt/local/ so in setup.py find the two lines:&lt;br /&gt;&lt;pre&gt;add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')&lt;/pre&gt;&lt;br /&gt;and add two similar lines before them that point to /opt/local/lib and /opt/local/include, like:&lt;br /&gt;&lt;pre&gt;add_dir_to_list(self.compiler.library_dirs, '/opt/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/opt/local/include')
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')&lt;/pre&gt;&lt;br /&gt;Now you can configure and build Python.&lt;br /&gt;&lt;pre&gt;$ ./configure --enable-framework MACOSX_DEPLOYMENT_TARGET=10.5 --with-universal-archs=all
$ make
$ make test
$ sudo make frameworkinstall&lt;/pre&gt;&lt;br /&gt;Note that if you've got any other non-Apple distributed versions of Python installed and want to keep the default version as it was, use (for example, to revert default back to 2.5):&lt;br /&gt;&lt;pre&gt;$ cd /Library/Frameworks/Python.framework/Versions/
$ sudo rm Current &amp;amp;&amp;amp; sudo ln -s 2.5 Current&lt;/pre&gt;&lt;br /&gt;Finally, so that the command &quot;python3.0&quot; works from the command-line, you need to either add /Library/Frameworks/Python.framework/Versions/3.0/bin/ to your PATH; or symlink /Library/Frameworks/Python.framework/Versions/3.0/bin/python3.0 to a standard directory in your PATH, like /usr/bin or /usr/local/bin .  On my box, I install custom stuff into /usr/local/ and so I added these symlinks:&lt;br /&gt;&lt;pre&gt;$ sudo ln -s /Library/Frameworks/Python.framework/Versions/3.0/bin/python3.0 /usr/local/bin/
$ sudo ln -s /Library/Frameworks/Python.framework/Versions/3.0/bin/2to3 /usr/local/bin/&lt;/pre&gt;</content>
		<author>
			<name>Chris Miles</name>
			<uri>http://chrismiles.livejournal.com/</uri>
		</author>
		<source>
			<title type="html">CM | tech &amp;gt;&amp;gt; LJ</title>
			<subtitle type="html">Chris Miles</subtitle>
			<link rel="self" href="http://chrismiles.livejournal.com/data/atom"/>
			<id>urn:lj:livejournal.com:atom1:chrismiles</id>
			<updated>2012-01-20T00:22:35+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Tracking down rogue processes</title>
		<link href="http://feedproxy.google.com/~r/Magpiebrain/~3/AVRS3BUMNPA/"/>
		<id>http://www.magpiebrain.com/?p=1093</id>
		<updated>2011-07-12T20:00:20+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;#8217;m in the process of migrating the many sites I manage from Slicehost over to EC2 (which is where this blog is currently running). I hit a snag in the last day or two &amp;#8211; my Montastic alerts told me that the sites I had already migrated were not responding. I tried &amp;#8211; and failed &amp;#8211; to SSH into the box. The CloudWatch graphs for the instance showed a 100% CPU use, explaining SSH being unresponsive. The problem is that I couldn&amp;#8217;t tell what was causing the problem. My only option was to restart the instance, which at least brought it back to life.&lt;/p&gt;
&lt;p&gt;What I needed was something that would tell me what was causing the problem. After reaching out to &lt;a href=&quot;http://www.thoughtworks.com/&quot;&gt;The Hive Mind&lt;/a&gt;, &lt;a href=&quot;http://offbytwo.com/&quot;&gt;Cosmin&lt;/a&gt; pointed me in the direction of some &lt;code&gt;awk&lt;/code&gt; and &lt;code&gt;ps&lt;/code&gt; foo. This little script gets a process listing, and writes out all those rows where the CPU is above 20%, prepended with the current timestamp: &lt;/p&gt;
&lt;pre class=&quot;brush: plain; light: true; title: ; notranslate&quot;&gt;
ps aux  | gawk '{ if ( $3 &amp;gt; 20 ) { print strftime(&amp;quot;%Y-%m-%d %H:%M:%S&amp;quot;)&amp;quot; &amp;quot;$0 } }
&lt;/pre&gt;
&lt;p&gt;My box rarely goes about 5% CPU use, and I was worried about the CPU ramping up so quickly that I didn&amp;#8217;t get a sample, so this threshold seemed sensible. The magic is the &lt;code&gt;if ( $3 &gt; 20)&lt;/code&gt; &amp;#8211; this only emits the line if the third column of input from &lt;code&gt;ps aux&lt;/code&gt; (which is the CPU) goes above 20.&lt;/p&gt;
&lt;p&gt;I put the one-liner in a script, then stuck the following entry into &lt;code&gt;cron&lt;/code&gt; to ensure that every minute, the script gets run. If everything is ok, no output. Otherwise, I&amp;#8217;ll get the full process listing. This wouldn&amp;#8217;t top the box getting wedged again, but would at least tell me what caused it.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; light: true; title: ; notranslate&quot;&gt;
* * * * * root /home/ubuntu/tools/cpu_log &amp;gt;&amp;gt; /var/log/cpu_log
&lt;/pre&gt;
&lt;p&gt;Lo and behold, several hours later and the box got wedged once again. After a restart, the &lt;code&gt;cpu_log&lt;/code&gt; showed this:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; light: true; title: ; wrap-lines: false; notranslate&quot;&gt;
2011-07-11 17:55:42 postfix   6398 29.6  0.3  39428  2184 ?        S    17:55   0:01 pickup -l -t fifo -u -c
2011-07-11 17:55:42 postfix   6398 29.6  0.3  39428  2180 ?        S    17:55   0:01 pickup -l -t fifo -u -c
2011-07-11 17:55:42 postfix   6398 29.6  0.2  39428  1556 ?        S    17:55   0:01 pickup -l -t fifo -u -c
2011-07-11 17:55:42 postfix   6398 24.6  0.2  39428  1368 ?        S    17:55   0:01 pickup -l -t fifo -u -c
2011-07-11 18:16:43 root      6440 50.0  0.0  30860   344 ?        R    18:16   0:01 pickup -l -t fifo -u -c
&lt;/pre&gt;
&lt;p&gt;Matching what the CloudWatch graphs showed me, the CPU ramped up quote quickly, before I loose all output (the 4th column here is CPU). But this time, we have a culprit &amp;#8211; Postfix&amp;#8217;s &lt;code&gt;pickup&lt;/code&gt; process. I had configured Postfix just a day or two back, so clearly something was amiss. Nonetheless, I can at least now disable Postfix to spend some time diagnosing the problem.&lt;/p&gt;
&lt;h3&gt;Limiting CPU&lt;/h3&gt;
&lt;p&gt;Something else that was turned up in my cries for help was &lt;a href=&quot;http://cpulimit.sourceforge.net/&quot;&gt;cpulimit&lt;/a&gt;. This utility would allow me to cap how much CPU a given process used. If and when I re-enable postfix, I&amp;#8217;ll almost certainly use this to avoid future outages while I iron out any kinks.&lt;/p&gt;
&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=AVRS3BUMNPA:xpnfgUWgA4A:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=AVRS3BUMNPA:xpnfgUWgA4A:7Q72WNTAKBA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=7Q72WNTAKBA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=AVRS3BUMNPA:xpnfgUWgA4A:D7DqB2pKExk&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?i=AVRS3BUMNPA:xpnfgUWgA4A:D7DqB2pKExk&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=AVRS3BUMNPA:xpnfgUWgA4A:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<author>
			<name>Sam Newman</name>
			<uri>http://www.magpiebrain.com</uri>
		</author>
		<source>
			<title type="html">Magpiebrain</title>
			<link rel="self" href="http://feeds.feedburner.com/Magpiebrain"/>
			<id>http://feeds.feedburner.com/Magpiebrain</id>
			<updated>2012-02-05T00:22:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">£ key in Windows on a US laptop keyboard, done right.</title>
		<link href="http://tartley.com/?p=1318"/>
		<id>http://tartley.com/?p=1317</id>
		<updated>2011-07-10T12:06:34+00:00</updated>
		<content type="html">&lt;p&gt;The usual solution to typing non-US characters on a US keyboard in Windows is to hold left-alt, then type on the numeric keypad:&lt;/p&gt;
&lt;p&gt;£     Left-alt + 0163&lt;br /&gt;
€     Left-alt + 0128&lt;/p&gt;
&lt;p&gt;This is a pain on my (otherwise fabulous) Thinkpad laptop, because the numeric keypad is accessed by holding the blue &amp;#8216;Fn&amp;#8217; key while you tap ScrLk, to toggle numeric keypad mode, and then doing the same again afterwards to turn it off.&lt;/p&gt;
&lt;p&gt;One inadequate alternative (on WindowsXP, YMMV)  is to go into control panel; Regional and Language Options; Languages; Details; Settings. Add a new keyboard configuration, &amp;#8220;United States-International&amp;#8221;, which should be grouped under your existing language (&amp;#8220;English (United Kingdom)&amp;#8221; for me.) OK all the dialogs, restart your applications.&lt;/p&gt;
&lt;p&gt;Now you can simply type:&lt;/p&gt;
&lt;p&gt;£      Right-alt + Shift + 4&lt;br /&gt;
€      Right-alt + 5&lt;/p&gt;
&lt;p&gt;The downside of this solution is that the &amp;#8220;UnitedStates-International&amp;#8221; keyboard setting adds a bunch of other features, including &amp;#8216;dead-keys&amp;#8217;, whereby quotes and other punctuation are used to add accents to letters, which is overly intrusive if, like me, you hardly ever use accents.&lt;/p&gt;
&lt;p&gt;Ultimate solution then, define your own personal keyboard layout. Download the Microsoft Keyboard Layout Creator from here: &lt;a href=&quot;http://msdn.microsoft.com/en-us/goglobal/bb964665&quot;&gt;http://msdn.microsoft.com/en-us/goglobal/bb964665&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My end result is an MSI with which I can install a new keyboard layout, which is exactly like &amp;#8216;US&amp;#8217;, but with the addition of £ on the key right-alt + 3:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://tartley.com/wp-content/uploads/2011/07/windows-US-keyboard-layout-with-pound-on-right-alt-3.zip&quot;&gt;windows-US-keyboard-layout-with-pound-on-right-alt-3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The source .klc file is in there, so you could add your own tweaks on top of that.&lt;/p&gt;</content>
		<author>
			<name>Jonathan Hartley</name>
			<uri>http://tartley.com</uri>
		</author>
		<source>
			<title type="html">tartley.com</title>
			<subtitle type="html">It has been said that a website devoted to oneself is the greatest act of hubris. Welcome aboard...</subtitle>
			<link rel="self" href="http://tartley.com/?feed=rss2"/>
			<id>http://tartley.com/?feed=rss2</id>
			<updated>2011-12-06T10:22:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Briefed</title>
		<link href="http://feedproxy.google.com/~r/Magpiebrain/~3/CXcZqCTPsHg/"/>
		<id>http://www.magpiebrain.com/2011/07/09/briefed/</id>
		<updated>2011-07-09T16:43:00+00:00</updated>
		<content type="html">&lt;p&gt;My new wordpress theme I think&lt;/p&gt;
&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=CXcZqCTPsHg:PQ3n4qCjZ6Y:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=CXcZqCTPsHg:PQ3n4qCjZ6Y:7Q72WNTAKBA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=7Q72WNTAKBA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=CXcZqCTPsHg:PQ3n4qCjZ6Y:D7DqB2pKExk&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?i=CXcZqCTPsHg:PQ3n4qCjZ6Y:D7DqB2pKExk&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?a=CXcZqCTPsHg:PQ3n4qCjZ6Y:dnMXMwOfBR0&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/Magpiebrain?d=dnMXMwOfBR0&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;</content>
		<author>
			<name>Sam Newman</name>
			<uri>http://www.magpiebrain.com</uri>
		</author>
		<source>
			<title type="html">Magpiebrain</title>
			<link rel="self" href="http://feeds.feedburner.com/Magpiebrain"/>
			<id>http://feeds.feedburner.com/Magpiebrain</id>
			<updated>2012-02-05T00:22:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-uk">
		<title type="html">Slides about Kwissle from yesterdays London Python Dojo</title>
		<link href="http://www.peterbe.com/plog/slides-about-kwissle-lpdojo"/>
		<id>http://www.peterbe.com/plog/slides-about-kwissle-lpdojo</id>
		<updated>2011-07-08T09:30:00+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://www.peterbe.com/plog/slides-about-kwissle-lpdojo/slides.html&quot;&gt;Here are the slides&lt;/a&gt; from yesterday's &lt;a href=&quot;https://ldnpydojo.eventwax.com/london-python-code-dojo-season-2-finale&quot;&gt;London Python Dojo&lt;/a&gt; event.&lt;/p&gt;
&lt;p&gt;I presented and demo'ed &lt;a href=&quot;http://kwissle.com&quot;&gt;Kwissle&lt;/a&gt; to my fellow Python London friends and focused a lot on the technology but also tried to plug the game a bit. &lt;/p&gt;
&lt;p&gt;Having seen that there's a lot of interest in &quot;socket&quot; related web applications about I thought this was a good chance to say that you don't need NodeJS and that &lt;a href=&quot;https://github.com/MrJoes/tornadio&quot;&gt;tornadio&lt;/a&gt; is a great framework for that.  &lt;/p&gt;</content>
		<author>
			<name>Peter Bengtsson</name>
			<uri>http://www.peterbe.com</uri>
		</author>
		<source>
			<title type="html">Peterbe.com</title>
			<subtitle type="html">Peter Bengtssons's personal homepage about little things that concern him.</subtitle>
			<link rel="self" href="http://www.peterbe.com/rss.xml?oc=Python&amp;oc=Zope"/>
			<id>http://www.peterbe.com/rss.xml?oc=Python&amp;oc=Zope</id>
			<updated>2012-02-05T00:22:11+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-US">
		<title type="html">Wrong About MySpace ... and What Else?</title>
		<link href="http://feedproxy.google.com/~r/ForSomeValueOfMagic/~3/7q3r88IVmfQ/wrong-about-myspace-and-what-else.html"/>
		<id>tag:blogger.com,1999:blog-496482.post-1349426456346208206</id>
		<updated>2011-06-29T22:50:57+00:00</updated>
		<content type="html">&lt;div&gt;Now the the Murdoch empire's six-year trip to the shitter has seen MySpace thrown out of the group for chump change (and there's a stockholder lawsuit waiting to be tried, since arguably it has sold a 95% stake in a still very large chunk of Internet traffic) I thought we might look back and see what it was that Murdoch thought made MySpace a good buy in the first place.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;At the time News Corporation bought Intermix, a minor media company whose principal property was MySpace,&amp;nbsp;a News Corp. official was&amp;nbsp;&lt;a href=&quot;http://www.nytimes.com/2005/07/18/business/18cnd-newscorp.html&quot;&gt;reported by the New York Times&lt;/a&gt;&amp;nbsp;as saying MySpace generated &quot;healthy&quot; annual profits of &quot;a few million dollars.&quot; Sadly the only way I can quote the News Corporation annual report from 2006 is to insert a graphic, since this is a company that still maintains the traditional stance to &quot;copyright&quot; and won't let you copy text lest you abuse some &quot;corporate right&quot; or &quot;digital right&quot; that has to be &quot;managed&quot;. Whatever. The report said:&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-aWFczWBT55Q/TguriFkVZfI/AAAAAAAAAY0/bGcv6Czawxg/s1600/2011-06-29_15-44-00.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;http://1.bp.blogspot.com/-aWFczWBT55Q/TguriFkVZfI/AAAAAAAAAY0/bGcv6Czawxg/s320/2011-06-29_15-44-00.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;If ever a statement were designed to bring hubris down on the head of an errant corporation, &quot;our company has begun to ... surpass the Internet elite&quot; would be it. It's the corporate equivalent of John Lennon saying the Beatles are bigger than Jesus. Clearly the gods decided there and then that, no matter how wisely it was managed, no matter how exceptional the staff assigned, no matter how crystal clear Fox Interactive Media's Internet vision was, this company was doomed to failure.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;The message of doom had not penetrated in 2007, though, when the most significant things said about MySpace in the report were:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-daxZgjd1tmw/Tguvxoz7KPI/AAAAAAAAAY4/9KPAHuJlBgE/s1600/2011-06-29_16-03-50.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;71&quot; src=&quot;http://1.bp.blogspot.com/-daxZgjd1tmw/Tguvxoz7KPI/AAAAAAAAAY4/9KPAHuJlBgE/s400/2011-06-29_16-03-50.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Profits, improved infrastructure, broadened offerings. These are all things a growing business likes to be able to report. With increased revenues&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;and&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;nbsp;profits on the horizon it would be, in&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;i&gt;Private Eye&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&amp;nbsp;magazine's timeless phrase, &quot;treble brandies all round&quot; in the boardroom.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;In 2008 News Corporation, tiresomely, and in a magnificent display of lack of understanding the Internet medium, turned to Flash for the annual report. The Flash tool was so opaque the only option was to download the PDF again. Only now I had to search it for myself. Arguably, News Corporation ought to know what &quot;publishing&quot; is. This is not it. Mention of MySpace is sprinkled throughout the report, with nary a sign of the coming storm on the horizon. A photo site had been acquired to compliment MySpace, and MySpace had been in partnership with this, that or the other enterprise to produce some Internet media coup or other. All very boring and normal, really.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;In 2009 the trail again leaves PDF as the favored viewing option (no way am I going to listen to and watch the ridiculous glitz the Flash &quot;HTML&quot; version imposes on the numbed viewer). The first mention of anything that might be described as disquiet about strategy now appears:&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-eUbzaeSz00w/Tgu1S1HxaAI/AAAAAAAAAY8/mUnpuesijvI/s1600/2011-06-29_16-26-31.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;80&quot; src=&quot;http://4.bp.blogspot.com/-eUbzaeSz00w/Tgu1S1HxaAI/AAAAAAAAAY8/mUnpuesijvI/s400/2011-06-29_16-26-31.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;No clue is given as to the identity of these &quot;people&quot; from &quot;within the industry&quot;, but since these purport to be the words of Chairman Murdoch, we may safely assume he counts himself among their number. Charging bravely onwards we see MySpace now relegated in reporting to an &quot;Other&quot; section created almost specially for Fox Interactive Media (the only other company reported under that heading is an Eastern European hoarding space sales organization). And what do we read?&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-oDK3SDle7Vs/Tgu3xaqbGRI/AAAAAAAAAZE/OM3GbVQqI3A/s1600/2011-06-29_16-35-51.png&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;72&quot; src=&quot;http://4.bp.blogspot.com/-oDK3SDle7Vs/Tgu3xaqbGRI/AAAAAAAAAZE/OM3GbVQqI3A/s400/2011-06-29_16-35-51.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;MySpace is just one of a number of domains in a tiny little part of a huge empire. These people have bigger fish to fry, right? Since I haven't yet seen a 2010 annual report I will decline to speculate about the level of enthusiasm, but I think even Bertie Wooster would, in MySpace's place, be feeling a certain coldness and considering a return to London's safer climes.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;And now, today, comes the announcement that what remains of MySpace is&amp;nbsp;&lt;a href=&quot;http://www.latimes.com/business/la-fi-ct-myspace-sale-20110630,0,932431.story&quot;&gt;to be unceremoniously sold&lt;/a&gt;&amp;nbsp;like, well, like a business that's had all the value pissed out of it by people who don't understand &quot;new media&quot; and think that old media muscle is all that's really needed to weather this technology storm.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;The interesting question for me is, if Murdoch could be so wrong about MySpace a scant six years ago, what other losing technology bets has he made? MySpace demonstrates very clearly that value can disappear from a networked enterprise in a surprisingly short time. News Corporation could be in serious trouble if it fails to adapt to the Internet age as Microsoft so nearly did.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/496482-1349426456346208206?l=holdenweb.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;feedflare&quot;&gt;
&lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=7q3r88IVmfQ:tMsTNzBXPD0:yIl2AUoC8zA&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?d=yIl2AUoC8zA&quot; border=&quot;0&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?a=7q3r88IVmfQ:tMsTNzBXPD0:Jy2wSXVWK38&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/~ff/ForSomeValueOfMagic?i=7q3r88IVmfQ:tMsTNzBXPD0:Jy2wSXVWK38&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/ForSomeValueOfMagic/~4/7q3r88IVmfQ&quot; height=&quot;1&quot; width=&quot;1&quot; /&gt;</content>
		<author>
			<name>Steve</name>
			<email>noreply@blogger.com</email>
			<uri>http://holdenweb.blogspot.com/</uri>
		</author>
		<source>
			<title type="html">For Some Value of &quot;Magic&quot;</title>
			<subtitle type="html">Python, software, open source, plus odd rants about almost anything</subtitle>
			<link rel="self" href="http://holdenweb.blogspot.com/atom.xml"/>
			<id>tag:blogger.com,1999:blog-496482</id>
			<updated>2012-01-24T18:22:42+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">High Performance Python Tutorial v0.1 (from my 4 hour tutorial at EuroPython 2011)</title>
		<link href="http://ianozsvald.com/2011/06/29/high-performance-python-tutorial-v0-1-from-my-4-hour-tutorial-at-europython-2011/"/>
		<id>http://ianozsvald.com/?p=1159</id>
		<updated>2011-06-29T06:49:37+00:00</updated>
		<content type="html">&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt; &amp;#8211; the v0.2 &lt;a href=&quot;http://ianozsvald.com/2011/07/25/high-performance-python-tutorial-v0-2-from-europython-2011/&quot;&gt;High Performance Python tutorial&lt;/a&gt; is now available.&lt;/p&gt;
&lt;p&gt;I enjoyed running a 4 hour tutorial on &lt;a href=&quot;http://ep2011.europython.eu/conference/talks/experiences-making-cpu-bound-tasks-run-much-faster&quot;&gt;High Performance Python at EuroPython&lt;/a&gt; last week (great event guys!). The class was limited to 40 people and I&amp;#8217;d love for more people to benefit from the several weeks of work that went into it so I&amp;#8217;ve written it up as a 49 page PDF (license: Creative Commons By Attribution).&lt;/p&gt;
&lt;p&gt;This is v0.1, please take a look and give me feedback so I can release an improved v0.2 within a few weeks. Is anything missing? Sure! A couple of sections just have src (no write-up) and there&amp;#8217;s a bunch of IAN_TODO markers for me to complete for the next revision. The 49 pages should have something useful for you to chew on though.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Download &amp;#8220;&lt;a title=&quot;High Performance Python v0.1 (pdf)&quot; href=&quot;http://ianozsvald.com/HighPerformancePythonfromTrainingatEuroPython2011_v0.1.pdf&quot;&gt;High Performance Python v0.1 (pdf)&lt;/a&gt;&amp;#8221; and send me your feedback! The source code for the examples is on this &lt;a href=&quot;https://github.com/ianozsvald/EuroPython2011_HighPerformanceComputing&quot;&gt;github page&lt;/a&gt; (including the Sphinx src for the pdf).&lt;/span&gt; Get the updated v0.2 &lt;a href=&quot;http://ianozsvald.com/2011/07/25/high-performance-python-tutorial-v0-2-from-europython-2011/&quot;&gt;High Performance Python tutorial&lt;/a&gt; now.&lt;/p&gt;
&lt;p&gt;The EuroPython tutorial slides are on slideshare as the &lt;a href=&quot;http://www.slideshare.net/IanOzsvald/euro-python2011-high-performance-python&quot;&gt;High Performance Python tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Topics covered:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Python profiling (cProfile, RunSnake, line_profiler) &amp;#8211; find bottlenecks&lt;/li&gt;
&lt;li&gt;PyPy &amp;#8211; Python&amp;#8217;s new Just In Time compiler&lt;/li&gt;
&lt;li&gt;Cython &amp;#8211; annotate your code and compile to C&lt;/li&gt;
&lt;li&gt;numpy integration with Cython &amp;#8211; fast numerical Python library wrapped by Cython&lt;/li&gt;
&lt;li&gt;ShedSkin &amp;#8211; automatic code annotation and conversion to C&lt;/li&gt;
&lt;li&gt;numpy vectors &amp;#8211; fast vector operations using numpy arrays&lt;/li&gt;
&lt;li&gt;NumExpr on numpy vectors &amp;#8211; automatic numpy compilation to multiple CPUs and vector units&lt;/li&gt;
&lt;li&gt;multiprocessing &amp;#8211; built-in module to use multiple CPUs&lt;/li&gt;
&lt;li&gt;ParallelPython &amp;#8211; run tasks on multiple computers&lt;/li&gt;
&lt;li&gt;pyCUDA &amp;#8211; run tasks on your Graphics Processing Unit&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you haven&amp;#8217;t been to a EuroPython &amp;#8211; I definitely recommend them. Next year&amp;#8217;s will also be in Florence (a lovely city with lovely people), the science/HPC tracks were very interesting to me and I hope to see more of the same next year.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr /&gt;
Ian applies Artificial Intelligence as an Artificial Intelligence Researcher for companies (&lt;a href=&quot;http://morconsulting.com&quot; title=&quot;Artificial Intelligence consultant&quot;&gt;Mor Consulting&lt;/a&gt;), co-founded the &lt;a href=&quot;http://strongsteam.com&quot; title=&quot;Artificial Intelligence toolkit&quot;&gt;StrongSteam&lt;/a&gt; A.I. datamining toolkit, co-authored &lt;a href=&quot;http://socialtiesapp.com/&quot; title=&quot;Social Ties social discovery tool for conferences and events&quot;&gt;SocialTies&lt;/a&gt;, programs Python, writes &lt;a href=&quot;http://TheScreencastingHandbook.com&quot; title=&quot;Screencasting Tutorial eBook&quot;&gt;The Screencasting Handbook&lt;/a&gt; and is also a sea-side dweller and consumer of fine coffees.</content>
		<author>
			<name>Ian Ozsvald</name>
			<uri>http://ianozsvald.com</uri>
		</author>
		<source>
			<title type="html">Entrepreneurial Geekiness » Python</title>
			<subtitle type="html">My thoughts on screencasting, the A.I. Cookbook and high-tech entrepreneurship</subtitle>
			<link rel="self" href="http://ianozsvald.com/category/python/feed/"/>
			<id>http://ianozsvald.com/category/python/feed/</id>
			<updated>2012-02-02T08:22:24+00:00</updated>
		</source>
	</entry>

</feed>

