err, I suppose the missing bit there is that you'll probably want to:

reactor.callLater(timeout, d.cancel)

As opposed to calling d.cancel() directly. (That snippet was in bpython-urwid with the reactor running in the background, but I doubt it'd work well anywhere else outside of manholes :))

cheers
lvh