Es Tea Double Eye

You're never too old for a happy childhood

Tag: Python

Pubsubhubbub on Google appspot

It is the weirdest thing. I was having issues subscribing to blogs that is using pubsubhubbub.appspot.com using a Python script. It returned a 500 Internal Server error without fail. So I rewrote the process in PHP and like magic, it is gone… I used PHP and CURL to subscribe to the appspot service. In Python [...]

The Google Go programming language

Lately Google announced a wide array of new products and features. The Google Chrome browser, Google Wave, Android and Google Chrome OS are the ones immediately coming to mind. This morning I saw they released Go. Their own experimental programming language. Go is not a scripting (a.k.a. interpreted) language, but a compiled language like C [...]

Django tests fail on a new project

This might be slightly confusing at first, but actually makes perfect sense if you think about it. If you have a brand new Django project and you run the tests it fails with a number of errors. # python manage.py test Creating test database… Creating table auth_permission Creating table auth_group Creating table auth_user Creating table [...]

Call me anal, but I really like Django templates

For all the wrong reasons, but still! I just love the fact that it actually uses a .html extension. Am I weird? I do feel a bit weird that I like something so arb. So the template files use the extension of what it actually contains? Wow, I love that. Revolutionary. Don’t ask me why [...]

The importance of documentation

Very good post on open source documentation via @TheKeyboard » Open Source Is Really About Documentation – Twisted vs. Tornado. Chris Brain’s point in short is: I think I can give you an executive summary of this blog post: if the documentation for an open source project sucks, nobody but the most hardcore developers will [...]

The Zen of Python

Found at this Stack overflow gem. “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” :)

HTTP conditional GET with Python urllib2

When aggregating or reading crap loads of RSS feeds, it makes little or no sense to read every feed every time you check, when most feeds is updated only once a day. To give you and idea, at Afrigator the size of the feeds are half a gig (500 MB), so if you do that [...]

Django with apache and mod_wsgi issues

I ran into a fairly common error while setting up Django with mod_wsgi and Apache on Debian. What irritates me about it is that I didn’t pick it up right away, but I’ll blame the long Easter weekend for that. :P ImportError: Could not import settings ‘mysite.settings’ (Is it on sys.path? Does it have syntax [...]

Switched to Python Fabric

We’ve been using Capistrano to deploy Afrigator to our various servers for a while now. I can seriously not complain or say anything bad about Capistrano. Thing is, I’m more familiar with Python than I am with Ruby, thus for me it just makes more sense for me to use Fabric. Here is a small [...]

How to calculate the days between two dates using Python. Quickly.

This is one of those pretty useless things, but you never know when you might just have the need for something like this… I have not taken the time to investigate a quicker way using Bash, but my love of Python made me use it without even thinking twice! :) I first fired up the [...]