excess.org

Ian Ward

Software
CKAN contributor/tech lead
Urwid author
PyRF contributor
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

Articles Tagged “Python” rss icon

Python on Android, Django Unit Testing at OPAG link
Posted on 2011-05-25.

Ottawa Python Authors Group meeting tomorrow Thursday May 26 at 8p.m. Best of all it's not me talking this time!

Hope you can make it out.

Tags: Django Ottawa Software Python OPAG


Python 2 and 3 Slides link
Posted on 2011-05-19, last modified 2011-05-23.

Catching up on some more old business: here are the slides from the Python 2 and Python 3 talk I gave at last month's OCLUG meeting.

I am also preparing some Python tutorials for the upcoming 2011 Linux Symposium in Ottawa June 13-15. Hope you can make it.

Tags: Ottawa OCLUG OLS Software Linux Python


Python logo
Python Talk at OCLUG on Tuesday link
Posted on 2011-04-03.

I will be giving a talk on Python 2 and Python 3 at the Ottawa Canada Linux Users Group meeting on Tuesday. Hope to see you there.

Tags: Ottawa OCLUG Software Linux Python


PyCon masthead
Posted on 2011-03-23.

Here are some of my favourite videos from this PyCon this year:

Read More …

Tags: Software Video Python


Python Data Structures at the Pub Wednesday link
Posted on 2011-03-21.

The Ottawa Python Authors Group is gathering at the Georgetown pub on Wednesday March 23. The theme of this meeting is Python Data Structures and String Processing. It's a great topic for beginners and experienced python users alike. Hope to see you there.

Tags: Ottawa Software Python OPAG


Moving to Python 3 link
Posted on 2011-02-17.

My article on supporting Python 2 and Python 3 from the same code base is now freely available on LWN.net. The article is based on my recent work on Urwid's Python 3 support. I owe thanks to the people that started and contributed the compatibility work on github and bitbucket. I'm looking forward to a release with Python 3 support very soon.

I also gave a talk at last night's OPAG about these changes. Thank you to all those that came out, we should have these meetings more regularly. Maybe back at the pub next time?

Tags: Urwid Ottawa Software Python LWN.net OPAG


OPAG Pub Meeting Tuesday link
Posted on 2011-01-10.

The Ottawa Python Authors Group is gathering at the Georgetown pub tomorrow. The meeting is open and unstructured this time. I'll be there presenting a bit of my recent work with Python 3 and hg-git.

Tags: Ottawa Python OPAG


Django Hides (some) Widget Exceptions link
Posted on 2010-12-13.

If you write any custom Django widgets or admin list_display callable functions you have probably run into this: Everything looks ok, except the place where your widget should be is just blank. Nothing. No traceback or any clue as to what went wrong.

It seems that Django suppresses all the exceptions sent by widgets rendering except for AssertionError and TypeError. Debugging under those conditions is tricky, so I wrote a function decorator to help. Just import this and put @assert_on_exception before your render method or admin list_display callable function:

def assert_on_exception(fn):
    import sys
    def wrap(*args, **kwargs):
        try:
            return fn(*args, **kwargs)
        except (AssertionError, TypeError):
            raise
        except:
            raise AssertionError(sys.exc_info()[0].__name__ + ": " + str(sys.exc_info()[1]))
    wrap.__name__ = fn.__name__
    wrap.__dict__.update(fn.__dict__)
    wrap.__doc__ = fn.__doc__
    wrap.__module__ = fn.__module__
    return wrap

Tags: Django Software Python


Speedometer 2.7 Screenshot
Speedometer 2.7 Released link
Posted on 2010-11-08.

I've updated my Speedometer project to use some of the latest Urwid features.

This release works well with light, dark or transparent backgrounds. It can display in monochrome mode and now has 88/256-color mode support (with a solid background color). There is also a new option to exit once a monitored file download completes.

Speedometer 2.7 requires Urwid 0.9.9.1 (Speedometer 2.6 was compatible with ancient versions of Urwid) it now uses raw_display, MainLoop and the updated Pile widget. Otherwise the features and code structure are largely unchanged.


Tags: Urwid Software Speedometer Python


Sphinx logo
Sphinx Presentation at OPAG link
Posted on 2010-08-29.

I will be giving a talk at the September meeting of the Ottawa Python Authors Group covering some documentation work I have done recently using Sphinx domains and a custom Pygments lexer.

I am working on an embedded device for a client that includes a proprietary text command language. Sphinx supports documenting many common languages like C, Python and Ruby, but with the 1.0 release it now allows adding "domains" for new languages. I have used this feature to create a domain for this command language.

Sphinx uses Pygments to provide syntax hilighting for source code examples. None of the available options fit this command language so I also created a custom lexer for this command language in just a few lines of code.

My talk will cover creating these extensions for Sphinx and Pygments.

Tags: Ottawa Software Python OPAG


« page 1 2 3 4 5 6 7 page »