[Twisted-Python] Documentation Question

John Landahl john at landahl.org
Fri Nov 14 02:14:05 EST 2003

On 14 Nov 2003 06:24:12 -0000, Moshe Zadka <twisted at zadka.site.co.il> 
> In general, I highly recommend using help() from the interactive 
> interpreter to read the docstrings of stuff, and see how to call it.

And with IPython it's even simpler, e.g. "help reactor.listenUDP".  
IPython does the parens for you, allowing for new heights of laziness. :)

If the docstrings aren't enough and you want to see the source after all, 
"psource reactor.listenUDP" shows you the source for just that single 
function, in pretty colors, even.

And you can't beat the tab completion: "reactor.listen<TAB>" shows you 
lots of interesting things.

Sure, it's slow to load, but IPython takes the interactive Python 
experience to a whole new level, especially in situations like this where 
you're exploring new (to you) code.

Oh yeah, try the @pdb option, which automatically launches the debugger 
*at the point of failure* when an uncaught exception occurs.  Alas, since 
the reactor catches all exceptions, this won't help much with Twisted apps.

_jpl_ (a satisfied customer)

More information about the Twisted-Python mailing list