Richard Jones' Log

Fri, 27 Jan 2006
Roundup 1.0 has been released!

And they said it'd never happen. OK, I said it'd never happen. After four and a half years (8 major feature releases) it was about time.

Roundup 1.0 is out!

The latest feature release seemed like a really good place to draw the line in the sand. The code is very stable now. All the important features are in there.

I'm thinking about moving on to work on some tracker templates. Like maybe a Trac-alike one. Except, you know, better :)

Tue, 24 Jan 2006
2006 reading list

Rachel's kept a reading list for a few years now. Out of curiosity I've started one myself this year.

Mon, 23 Jan 2006
Index Python source in OS X

Toby just pointed me at the Python Metadata Importer for OS X. See useful stuff in the More Info pane, and search Python source in Finder.

Thu, 19 Jan 2006
Pyweek site is live

Over at the spanky new The code's not all finished yet (but doesn't need to be for another 65 days ;)

That sees the end of my Django experimentation for a while. All up, it's not a bad framework, and I think that the 0.92 release will go a long way to making it a good framework.

category: Python | permanent link
Wed, 18 Jan 2006
Django peeves

I've been using Django for three days now. I'm getting more and more nervous about the black-magic model code. Today I ran into this ... strangeness. In my model code, I have:

class UTC(datetime.tzinfo):
    def utcoffset(self, dt):
        return datetime.timedelta(0)
    def tzname(self, dt):
        return "UTC"
    def dst(self, dt):
        return datetime.timedelta(0)

class Challenge(meta.Model):
    def start_utc(self):
        return datetime.datetime(self.start.year, self.start.month,
  , 0, 0, 0, 0, UTC)

Looks reasonable enough, but it breaks. Says the global "UTC" isn't defined, inside start_utc(). I have to hard-code UTC=UTC in the method signature to make that code work. Update: this is fixed in 0.92, the next major release.

The hiding of exceptions in template rendering is really starting to annoy. That is, if there's an issue rendering {{ some_callable }} in a template, then I see nothing. I've even got DEBUG on. Nothing appears in the browser, the page source or the server log. It could be that I mis-typed "some_callabl" or perhaps "some_callable" is a call and that raised an exception. I won't know unless I manually wrap "some_callable" in a try/except/import traceback to find out!

Tue, 17 Jan 2006
Who's the Release Manager for Python? Anthony Baxter...

"You know, Anthony Baxter"
"Which one is he again?"
"The guy who looks like Shirley Temple"
"Oooh, him, now I know who you mean"

category: Python | permanent link
Mon, 16 Jan 2006
Django exploration

I ended up going with Django for the pyweek website. I looked at both it and TurboGears and ended up choosing Django because "D" comes before "T" in the alphabet. There really didn't seem to be much else significant between them.

I spent about an hour on Saturday scribbling down the data model based on the old Zope pyweek code, translating that into Django model code and playing with the auto admin interface. I then got bored and did something else.

This morning I decided to try to get the most basic requirements going (stuff I need to announce the new website): some basic page views and user signup. Seems easy enough, right? Heh.

I spent about half an hour confused because there's a Context and a DjangoContext (I'm sure there's a good reason, though for the life of me I can't see it).

OK, so on to user registration and details editing ... er ... "Use '[algo]$[salt]$[hexdigest]'" ... you're kidding, right?

Right. Some time later and I've hand-rolled user registration and details editing pages. I've not done the password reset email thing yet because that can wait (I'm not going to have a huge number of users). On to the simpler stuff: implementing the polling and voting systems I need.

Thu, 12 Jan 2006
PyWeek web interface development thoughts

PyWeek #1 was run in's Zope. #2 will be running on a different machine, so I'm going to look into expanding my web development brain into either Django or TurboGears. They seem awfully similar at the moment, though Django's admin interfaces are kinda tipping the scales. TG's Kid templating is nice, but I don't need MochiKit. I need good authentication / permissions control, which I've not looked into too deeply in either. Sessions would be nice too. Zope's ObjectManager, PropertyManager and a few other things made life kinda nice and replacing those will be interesting. More investigation is needed.

Thanks to everyone who offered support for hosting PyWeek #2! The new website should be up tonight - my crappy web design skills and all :)

Aside: In the comments on the one of the web framework sites, someone's written "Wholly cow! This is a nice framework!" I've noticed this sort of thing before. There's probably a branch of linguistics, closely related to the mondegreens (misheard lyrics) stream, that's all about misheard exclamations.

Tue, 10 Jan 2006
PyWeek Python Game Programming Challenge, The Second!

PyWeek2 is coming up. I've scheduled it for the last week of March. The exact dates are 00:00UTC Sunday 26th March to 00:00UTC Sunday 2nd April.


If you are in a position to offer hosting for PyWeek, I'd greatly appreciate it. The challenge would benefit from an FTP upload facility, and my current web hosts can't provide that. Also, I'm pushing the boundaries of my web hosting a little too. Please let me know if you can offer:

  • Python-friendly web environment (for the challenge website), or
  • FTP upload facility for competitors (anon FTP is fine - we just need a drop-box).

I've updated the challenge rules with the only change from the PyWeek1 rules being a new method of selecting the challenge theme.