Timur Izhbulatov — Tech stuff — Projects — Programming — Python — Linux: Tech stuff http://timka.org/tech Entries in the 'Tech stuff' category of Timur Izhbulatov — Tech stuff — Projects — Programming — Python — Linux qooxdoo ContribLoader <p> Just a short note to myself. There's a bug in qooxdoo tool in <code>generator.action.ContribLoader.getRevision()</code>. The regular expression part should be <blockquote><pre> match = re.compile("\/viewvc\/qooxdoo-contrib\?view\=revision\&amp;revision\=([0-9]+)").search(line) </pre></blockquote> </p> http://timka.org/tech/2010/07/23/qooxdoo-contrib-loader http://timka.org/tech/2010/07/23/qooxdoo-contrib-loader Confession of Love <p>It's been a long time since my previous update, and many things have changed in my life. I've changed my job, quit my job, gone crazy, fallen in love, found myself, had two trips to Crimea, had a psychedelic experience and got a real African djembe from Ghana. </p> <p>But there's one thing I haven't done yet and it's confession of love. Not the kind of love we fall into, no. I'm talking about the professional kind of love.</p> <p>Why do I even talk about love in such an intellectualized high-tech field as information technology? I do this because I it's very important for me. Really, I've been working in IT since 2003, not to mention my earlier programming experience in the university and at school, and only now I fully realize why I'm still here. I simply like it.</p> http://timka.org/tech/2010/07/23/confession-of-love http://timka.org/tech/2010/07/23/confession-of-love Python urllib2 exceptions <p> Yesterday I made a working prototype of my Last.fm stream ripper written in Python. This is my second project that relatively intensively uses <code>urllib2</code> from Python standard library. </p> <p>One of important things that I've learned about <code>urllib2.urlopen()</code> from my previous project is that it does raise some other exceptions besides <code>urllib2.URLError</code> (e.g. <code>http.HTTPException</code> and <code>socket.error</code>) which is the only one mentioned in the <a href="http://docs.python.org/library/urllib2.html#urllib2.urlopen">documentation</a>.</p> http://timka.org/tech/2009/05/17/python-urllib2-exceptions http://timka.org/tech/2009/05/17/python-urllib2-exceptions How to fix font rendering in Firefox 3.5 on Ubuntu 9.04 <p>Yesterday I set up a fresh desktop with Ubuntu 9.04 (Jaunty Jackalope). One of the most pleasant features is Firefox 3.5 beta (Shiretoko) available out of the box, which is important for me since I use <a href="http://labs.mozilla.com/projects/weave/">Mozilla Weave</a> to sync my profiles. The problem is that Firefox 3.5 doesn't seem to use font hinting and therefore looks ugly while the default version (3.0) is OK.</p> http://timka.org/tech/2009/05/02/firefox-3.5-in-jaunty http://timka.org/tech/2009/05/02/firefox-3.5-in-jaunty Singleton in Python <p>Updated 2009-03-03. Arbitrary constructor arguments (Mark's suggestion).</p> <p>Updated 2008-12-30. Thread-safety.</p> <p> A recent <a href="http://www.plurk.com/p/amsvg">discussion</a> has drawn my attention again to the use of the Singleton pattern in Python. Here's how and why I do this. </p> http://timka.org/tech/2008/12/17/singleton-in-python http://timka.org/tech/2008/12/17/singleton-in-python Last.fm tag renaming utility update <p> I've updated my <a href="http://timka.org/svn/timka.org/tech/python/rename_lastfm_tag.py">Last.fm tag renaming utility</a>. </p> http://timka.org/tech/2008/08/15/lastfm-tag-renaming-utility-update http://timka.org/tech/2008/08/15/lastfm-tag-renaming-utility-update Release of watchdogdev <p> One of my projects is a Linux-based embedded device for playing commercials. The software part is a Python application controlling an <a href="http://mplayerhq.hu">MPlayer</a> process in slave mode. </p> <p> To make the whole system more fault-tolerant I wanted to use watchdog timer which would reboot the machine in case of software failure. Thus I needed to talk to Linux watchdog driver from my Python application. The Linux watchdog API defines a number of ioctl commands which can be sent to the driver. So, I wrote <a href="/watchdogdev">an extension module</a> which enables Python programms to use Linux watchdog API. </p> http://timka.org/tech/2008/04/21/watchdogdev-release http://timka.org/tech/2008/04/21/watchdogdev-release TurboGears behind Apache with Virtualmin <p>Recently <a href="http://matvey.org.ru/">Matvey</a> (thanks dude!) has set up a new <a href="http://www.virtualmin.com/">Virtualmin</a> hosting platform on <a href="http://debian.org/">Debian GNU/Linux</a>. When I was migrating <a href="http://timka.org/">timka.org</a> to this new platform I found out that Virtualmin is actually very powerful and nicely integrated with <a href="http://httpd.apache.org/">Apache</a> in Debian. Looking at all these new features and capabilities I thought that I could try to use them for running home-based <a href="http://turbogears.org/">TurboGears</a> applications on Virutalmin's virtual hosts.</p> http://timka.org/tech/2008/03/19/turbogears-behind-apache-with-virtualmin http://timka.org/tech/2008/03/19/turbogears-behind-apache-with-virtualmin Home-based installation of Python libraries <p>Many popular Python libraries are available in various Linux distributions. However, it is not always possible and/or desirable to install them from packages. For instance, sometimes you don't have root access to the target machine or just want to have other vesrion of some library isolated under your home directory.</p> <p>I've been successfully using this approach on my laptop and several development and production sites for about two years so far.</p> http://timka.org/tech/2008/01/30/home-based-installation-of-python-libraries http://timka.org/tech/2008/01/30/home-based-installation-of-python-libraries Blog engine for timka.org <p> I've been looking for some simple static blog engine and stumbled upon <a href="http://vss.73rus.com/wadcomblog/">WadcomBlog</a> by <a href="http://vss.73rus.com/">Vlad Skvortsov</a>. </p> http://timka.org/tech/2008/01/26/blog-engine http://timka.org/tech/2008/01/26/blog-engine GNU Autotools tutorial <p> Have you ever installed any software from source? If you have I bet you've also noticed all that stuff like configure.in and Makefile.in. Want to know what's it for, how it works and how it can be used? I've written a brief <a href="/svn/timka.org/tech/gnu-autotools-tutorial.sh"> tutorial</a>. </p> http://timka.org/tech/2007/03/01/gnu-autotools-tutorial http://timka.org/tech/2007/03/01/gnu-autotools-tutorial Editing ID3 tags with Python and Mutagen <p> Recently I've stumbled upon some <a href="http://en.wikipedia.org/wiki/Mp3">MP3</a> files containing no tags. I tried to tag these files using <a href="http://www.sacredchao.net/quodlibet">Quodlibet</a> but it appeared to be impossible. After a breif investigation of the problem I found out that it's just raw MPEG Layer III streams with no proper <a href="http://id3.org">ID3</a> headers. In order to fix this I decided to write a <a href="http://python.org">Python</a> script. </p> http://timka.org/tech/2007/02/01/editing-id3-tags-with-python-and-mutagen http://timka.org/tech/2007/02/01/editing-id3-tags-with-python-and-mutagen Fixing Last.fm tags using Python standard library <p><span style="color: red;">Updated 2008-08-15.</span> Works with new Last.fm.</p> <p> I've written a Python program for renaming tags on Last.fm. </p> http://timka.org/tech/2007/01/22/fixing-lastfm-tags-using-python-standard-library http://timka.org/tech/2007/01/22/fixing-lastfm-tags-using-python-standard-library