return to OCLUG Web Site
A Django site.
June 19, 2013

Ian Ward
excess - News
» Write the Docs

I will be attending the Write the Docs conference in Portland on Monday/Tuesday.

I've spent a lot of time with Sphinx this past year working on updating and improving the Urwid documentation. I've found writing documentation is a really hard but also really important and rewarding part of my programming work.


A site I've been working on for the past few months has just launched. "2.0" is a completely rewritten version of the Open Data portal for the Government of Canada.

I worked on the CKAN portion of the site responsible for the data catalogue. CKAN is an open source Data Portal application written in Python. I built a fully bilingual schema with many additional fields for our datasets. I also optimized, fixed and improved many parts of CKAN itself.

Our team built templates based on the Web Experience Toolkit (WET). WET provides building blocks for creating accessible, mobile-friendly web sites. These templates include a map widget for our geospatial datasets and an interactive data table for previews of tabular data.

All of our work is available on the open-data github page and is released under a permissive license. might just be the largest, most fully bilingual and most accessible CKAN site anywhere. More to come!

» Sean Zicari's Curses and Urwid Talk

Sean Zicari gave a Curses and Urwid presentation at the recent PyCon US in Santa Clara.

March 15, 2013

Ian Ward
excess - News
» Painting with Braille

This is something I've been wanting to write for a while.

Unicode page U+2800 has all the combinations of a 2x4 grid of Braille dots. Braille dots that line up neatly with the ones on all sides in most fonts. We can paint with this!

February 26, 2013

Ian Ward
excess - News
» Iterables, Iterators and Generators: Part 2

This is the second part of the talk I gave January 24, 2013 at the Ottawa Python Authors Group.

Part One introduces Python iterables and iterators and generators. This part covers the advanced use of generators while building an interactive two-player network game.

February 12, 2013

Ian Ward
excess - News
» Iterables, Iterators and Generators: Part 1

This is part one of a talk I gave January 24, 2013 at the Ottawa Python Authors Group

Part Two is now also available.

Both parts of this presentation are also available as a single IPython Notebook which you can download and run locally, or view with The complete source is available at

November 16, 2012

Ian Ward
excess - News
» Urwid 1.1.1 and 1.0.3 Released

Urwid maintenance releases 1.1.1 and 1.0.3 are now available. These releases contain only bug-fixes, see the Changelog for details.

November 14, 2012

Ian Ward
excess - News
» Urwid Applications at PyCon Canada

I gave a 20-minute talk running through 7 great Urwid Applications at PyCon Canada in Toronto this past weekend.

The "Console Applications with Urwid" video is now available. Huge thanks to the conference organizers for great, first, PyCon Canada. I look forward to the next one.

The programs I covered were:

November 1, 2012

Ian Ward
excess - News
» Python Container Literals

This post covers some basic Python syntax that tends to trip up people just starting with the language.

Literal tuple, list, dict and set definitions have some edge cases you need to be aware of when reading and writing Python code. Unfortunately some of these cases aren't consistent or obvious, but once you understand why they exist, they are easy to remember.

October 23, 2012

Ian Ward
excess - News
» Urwid 1.1.0 Released - Containers & Documentation

July 13, 2012

Ian Ward
excess - News
» Urwid 1.0.2 Released

Urwid maintenance release 1.0.2 is now available.

April 26, 2012

Ian Ward
excess - News
» Gerbi CMS

Gerbi CMS (nee django-page-cms) is a multilingual content management system written in Python and based on the Django web framework. It's currently my favourite CMS software and use it for a number of web sites I administer.

I'll be giving a talk about Gerbi CMS at the next OCLUG and OPAG meetings resembling this article.

April 9, 2012

Ian Ward
excess - News
» Paranoid Django Templates

If you've ever wanted to know if a Django template is using a variable it shouldn't be, or not using a variable it should, this code will make both cases fail loudly. Django's default template behaviour is to silently replace missing variables with an empty string, and ignore unused variables.

To use this code you can either:

  1. wrap your Context (or RequestContext) object in your view with a ParanoidContextProxy that will fail on any attempt to access a missing variable, or
  2. use the paranoid_render_to_response function (or similar) to also require that every variable you pass be used in the template.

January 23, 2012

Ian Ward
excess - News
» Urwid at Python Malaysia

I'll be giving a introductory-level presentation on Urwid at the Python Malaysia February Meetup in two weeks. I'm covering the basics with a short presentation and there should be plenty of time for questions or digging in deeper on any aspect.

[Update 2012-02-04]: Slides now available

[Update 2012-02-06 added some photos]

December 20, 2011

Ian Ward
excess - News
» Super Meat Boy with Reconfigured Keys

The Humble Indie Bundle #4 was nice enough to bring Super Meat Boy and a bunch of other great games to Linux. The SMB people however seem to want to punish you for playing on a keyboard and leave you with SPACE as jump, SHIFT as run, and no way to reconfigure the keys.

Here is a little xmodmap script that makes playing on a keyboard much more enjoyable:

keysym x = space
keysym z = Shift_L

Just save this as xmodmap.meat and then run xmodmap -pke > xmodmap.orig to save your original key settings.

Finally, run xmodmap xmodmap.meat before starting the game, and xmodmap xmodmap.orig when you're done.

December 19, 2011

Ian Ward
excess - News
» Unfortunate Python

.red {color:red}

Python is a wonderful language, but some parts should really have bright WARNING signs all over them. There are features that just can't be used safely and others are that are useful but people tend to use in the wrong ways.

This is a rough transcript of the talk I gave at my local Python group on November 15, with some of the audience feed back mixed in. Most of this came from hanging around the Python IRC channel, something I highly recommend.

[update 2011-12-19: improved "array" critique, add "python -i" suggestion to "reload" critique, add html targets to sections]

[update 2011-12-20: include additional links from agentultra and ffrinch]

[update 2012-01-06: added hasattr and find]

[update 2012-04-09: some links and syntax highlighting]

December 8, 2011

Ian Ward
excess - News
» Speedometer 2.8 Released

This release adds the long-requested linear scale feature to Speedometer. You can now also adjust the minimum and maximum values displayed, and switch all units shown to bits per second.

November 29, 2011

Ian Ward
excess - News
» Urwid 1.0.1 and Released

Urwid maintenance releases 1.0.1 and are now available. This may be the last 0.9.9 release, users are strongly encouraged to upgrade.

September 23, 2011

Ian Ward
excess - News
» Urwid 1.0.0 Released

This is a major feature release for Urwid.

Happy 1.0 Urwid! It's been a great nearly-seven years since our first release. Huge thanks to everyone that's contributed code, docs, bug reports and help on the mailing list and IRC.

September 19, 2011

Ian Ward
excess - News
» Widgets, Form Fields and Model Fields Explained

In any web application user data must be translated from HTML form data to native types and database types, and back again. Django web applcations are no different.

The "right way" to handle custom types is to extend Django's widgets, form fields and model fields. However, understanding exactly how these types perform each step of the conversion can be confusing. This post will attempt to explain how the data is converted at each stage and offer some advice about creating custom widgets, form fields and model fields.

This article is based on Django 1.3 and assumes the reader has experience creating and using Django forms, models and validation.