excess.org

Ian Ward

Consulting
Boxkite Inc.
Software
CKAN contributor/tech lead
PyRF primary contributor
Urwid author
Speedometer author

Presentations
Contributing to Open Source
IASA E-Summit, 2014-05-16
Urwid Applications
2012-11-14
Urwid Intro
2012-01-22
Unfortunate Python
2011-12-19
Django 1.1
2009-05-16

Writing
Moving to Python 3
2011-02-17
Article Tags

Home

Ian Ward's email:
first name at this domain

wardi on OFTC, freenode and github

Locations of visitors to this page

News rss icon

Literal Preview
Posted on 2012-11-01.

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.

Read More …

Tags: Software Python


Posted on 2012-10-23.

Read More …

Tags: Urwid Software Python


Urwid 1.0.2 Released link
Posted on 2012-07-13.

Urwid maintenance release 1.0.2 is now available.

Tags: Urwid Software Python


Gerbi CMS
Posted on 2012-04-26.

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.

Read More …

Tags: Django Ottawa OCLUG Software Python


Posted on 2012-04-09.

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.

Read More …

Tags: Django Software Python


Python Malaysia Meetup
Posted on 2012-01-22, last modified 2012-02-06.

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]

Read More …

Tags: Urwid Software Python


Super Meat Boy
Super Meat Boy with Reconfigured Keys link
Posted on 2011-12-20.

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.

Tags: Software Linux


Posted on 2011-12-19, last modified 2012-04-09.

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]

Read More …

Tags: Ottawa Software Python OPAG


Speedometer 2.8 Released link
Posted on 2011-12-08.

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.

Tags: Urwid Software Speedometer Linux


Urwid 1.0.1 and 0.9.9.3 Released link
Posted on 2011-11-28.

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

Tags: Urwid Software Python


« page 1 2 3 4 5 610 11 12 page »