<?xml version="1.0"?>
<rss version="2.0.">
  <channel>
    <title>Advogato blog for movement</title>
    <link>http://www.advogato.org/person/movement/</link>
    <description>Advogato blog for movement</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Sun, 20 Jul 2008 06:36:56 GMT</pubDate>
    <item>
      <pubDate>Sat, 12 Jul 2008 14:10:33 GMT</pubDate>
      <title>Writing Python Properly</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=218</link>
      <guid>http://bandmoreagain.blogspot.com/2008/07/writing-python-properly.html</guid>
      <description>What are people's approaches to writing Python correctly? The library documentation basically doesn't document the set of exceptions the routines can throw, which makes it very difficult to catch the right things, and do the right thing[1] (&lt;a href="http://docs.python.org/lib/module-popen2.html" &gt;for example&lt;/a&gt;). What do people do to deal with this problem?&lt;br /&gt;&lt;br /&gt;[1] on that note, if you're writing a command line tool in Python, &lt;span style="font-style: italic;"&gt;please&lt;/span&gt; catch KeyboardInterrupt and exit quietly. Drives me crazy!</description>
    </item>
    <item>
      <pubDate>Thu, 10 Jul 2008 15:09:40 GMT</pubDate>
      <title>Bubble calendar</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=217</link>
      <guid>http://bandmoreagain.blogspot.com/2008/07/bubble-calendar.html</guid>
      <description>These are cool:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.bubblecalendar.com/" &gt;&lt;br /&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px;" src="http://www.bubblecalendar.com/img/cinco.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.bubblecalendar.com/" &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Tue, 8 Jul 2008 22:06:27 GMT</pubDate>
      <title>Nice bookends</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=216</link>
      <guid>http://bandmoreagain.blogspot.com/2008/07/nice-bookends.html</guid>
      <description>Nice bookends:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.houseind.com/index.php?page=accessories&amp;amp;id=675&amp;amp;category=sculpture#675" &gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://www.houseind.com/include/getimage.php?id=5321" alt="" border="0" /&gt;&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Mon, 7 Jul 2008 04:06:59 GMT</pubDate>
      <title>Mercurial corruption (again)</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=215</link>
      <guid>http://bandmoreagain.blogspot.com/2008/07/mercurial-corruption-again.html</guid>
      <description>It's somewhat disappoint that Mercurial is &lt;a href="http://www.selenic.com/mercurial/bts/issue1216" &gt;still corrupting repositories when you interrupt MQ operations&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Relatively easily recoverable for me this time, thankfully. I'd still like to see &lt;span style="font-family: courier new;"&gt;hg backup from the &lt;a href="http://www.opensolaris.org/os/project/scm-migration/" &gt;OpenSolaris SCM project&lt;/a&gt; get merged upstream though :)&lt;/span&gt;</description>
    </item>
    <item>
      <pubDate>Wed, 2 Jul 2008 03:07:04 GMT</pubDate>
      <title>Pure Python Plugins</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=214</link>
      <guid>http://bandmoreagain.blogspot.com/2008/07/pure-python-plugins.html</guid>
      <description>After some searching and asking around I didn't find any good explanation of the simplest way to implement plugins in Python. So, for posterity's sake, here's my solution. I'm sure there's a better way: I'd love to hear your suggestions.&lt;br /&gt;&lt;br /&gt;First, the requirements. The code cannot have knowledge of how the plugins are named (.so files, .py, package dirs, etc.). I don't want to hard-code the list of plugins, as this defeats its dynamic nature altogether. I have to be able to iterate across all plugins. Any user should be able to use the module without knowing that it's got plugins. Finally, it's got to be as simple as possible.&lt;br /&gt;&lt;br /&gt;First up, we have &lt;tt&gt;whatever/__init__.py&lt;/tt&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import pkgutil&lt;br /&gt;import imp&lt;br /&gt;import os&lt;br /&gt;&lt;br /&gt;plugin_path = [os.path.join(__path__[0], "plugins/")]&lt;br /&gt;&lt;br /&gt;for loader, name, ispkg in pkgutil.iter_modules(plugin_path):&lt;br /&gt;    file, pathname, desc = imp.find_module(name, plugin_path)&lt;br /&gt;    imp.load_module(name, file, pathname, desc)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This basically uses Python's module search to find all contents of the &lt;tt&gt;plugins&lt;/tt&gt; sub-directory and load them. Now we have some more scaffolding in the same directory, as &lt;tt&gt;whatever/whatever.py&lt;/tt&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;plugins = []&lt;br /&gt;&lt;br /&gt;class plugin(object):&lt;br /&gt;   """Abstract plugin base class."""&lt;br /&gt;   ...&lt;br /&gt;&lt;br /&gt;def register_plugin(plugin)&lt;br /&gt;    global plugins&lt;br /&gt;    plugins += [ plugin ]&lt;br /&gt;&lt;br /&gt;# utility functions to iterate across and use plugins...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Finally, each plugin looks something like this, in &lt;tt&gt;plugins/foo.py&lt;/tt&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;from whatever/whatever import *&lt;br /&gt;&lt;br /&gt;class fooplugin(plugin):&lt;br /&gt;    """Concrete class for foo plugin."""&lt;br /&gt;    ...&lt;br /&gt;&lt;br /&gt;register_plugin(fooplugin)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Simple enough, but it took a while to work it out. Unfortunately, it doesn't seem possible to merge &lt;tt&gt;whatever.py&lt;/tt&gt; into &lt;tt&gt;__init__.py&lt;/tt&gt; as we have a recursive import problem.</description>
    </item>
    <item>
      <pubDate>Thu, 19 Jun 2008 18:07:10 GMT</pubDate>
      <title>Cake of awesomeness</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=213</link>
      <guid>http://bandmoreagain.blogspot.com/2008/06/cake-of-awesomeness.html</guid>
      <description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm4.static.flickr.com/3152/2540152721_a99ddbfff2.jpg" &gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://farm4.static.flickr.com/3152/2540152721_a99ddbfff2.jpg" alt="" border="0" /&gt;&lt;/a&gt;Best cake ever.</description>
    </item>
    <item>
      <pubDate>Mon, 16 Jun 2008 22:10:56 GMT</pubDate>
      <title>Amusing prank</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=212</link>
      <guid>http://bandmoreagain.blogspot.com/2008/06/amusing-prank.html</guid>
      <description>An &lt;a href="http://www.thefunnystuff.net/viewmovie.php?id=555" &gt;amusing prank&lt;/a&gt;. I love how they get back in, as if that'll somehow help.</description>
    </item>
    <item>
      <pubDate>Tue, 10 Jun 2008 23:13:53 GMT</pubDate>
      <title>Getting decent stack traces</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=211</link>
      <guid>http://bandmoreagain.blogspot.com/2008/06/getting-decent-stack-traces.html</guid>
      <description>Reading through &lt;a href="https://bugzilla.novell.com/show_bug.cgi?id=390722" &gt;this bug&lt;/a&gt; is seriously depressing to read (until Michael Matz steps in).&lt;br /&gt;It was always complete madness to strip symbols from shipping binaries; it was always&lt;br /&gt;madness to disable the frame pointer too. (The debuginfo trick is an excellent solution&lt;br /&gt;to the problems of source-level debugging, by the way, it's just taken way, way, too far).&lt;br /&gt;&lt;br /&gt;This is why you have to install a 1Gb debuginfo RPM in order to run OProfile on the kernel. Crazy.&lt;br /&gt;&lt;br /&gt;It's a good read if you like to see certain people behaving like asshats to their fellow community&lt;br /&gt;members too.</description>
    </item>
    <item>
      <pubDate>Mon, 9 Jun 2008 16:14:42 GMT</pubDate>
      <title>I Am Neurotic</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=210</link>
      <guid>http://bandmoreagain.blogspot.com/2008/06/i-am-neurotic.html</guid>
      <description>My favourite quote from &lt;a href="http://iamneurotic.com/" &gt;I Am Neurotic&lt;/a&gt;: "Everyday, at 7:47 am or pm, I always say Boeing, after the Airplane,  and I don't know why. I've gotten into a lot of trouble, and I even say it in  my sleep."</description>
    </item>
    <item>
      <pubDate>Fri, 6 Jun 2008 16:23:28 GMT</pubDate>
      <title>US TV</title>
      <link>http://www.advogato.org/person/movement/diary.html?start=209</link>
      <guid>http://bandmoreagain.blogspot.com/2008/06/us-tv.html</guid>
      <description>It's already extremely difficult to watch US TV, with adverts every 7 minutes, and massive animated&lt;br /&gt;station idents taking up half the screen, but this is particularly obnoxious:&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/2vUtfG9Bkec"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/2vUtfG9Bkec" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;It's as if they &lt;span style="font-style: italic;"&gt;want&lt;/span&gt; you not to watch.</description>
    </item>
  </channel>
</rss>
