Just pushed twill 0.6 out the door.
twill is a simple reimplementation of PBP, based on various Python hackage. You may recall from my earlier ravings that PBP is a system for automating simple tests of Web sites. Once I started using PBP a lot, I generated several patches that fixed some basic behavior, but the maintainer was busy with other things and couldn't spend the time to babysit my patches.
Sooooo, long story short, rather than maintaining my own fork of PBP, I decided to re-engineer it from scratch. Ian Bicking, a fellow sufferer, pointed out that IPython might be a good platform on which to build such a package, and I thought that sounded like a good idea.
The result is twill (yes, another random name).
My needs were pretty simple: I want to be able to automate tests of sites on the complexity level of the Quixote demo (form submit, link following, etc., but no Javascript). I also want to be able to automate dumb stuff like discarding all the spam that piles up in some of my more defunct SourceForge project mailing lists. And, last but not least, I want to be able to use it in unit-tests.
twill fulfills all of these needs as of this release. If you're interested you can see two simple Quixote demo test scripts, quixote-demo
and quixote-demo-2.
I did end up moving away from IPython a bit. Yes, there's an interactive mode that uses IPython, but it is, in fact, impossible to intercept exceptions in an InteractiveShell. This is necessary when processing scripts: you need to be able to catch exceptions and then exit the script without continuing... I also found IPython large, unwieldy, and full of special cases. I don't want to shoehorn my own in there ;).
So twill is basically a package that offers a thin wrapper around mechanize in the form of a Python library, along with some simple tools to help with program execution (autoquoting in interactive sessions and scripts both). It's very similar to PBP in style, but I think it will be easier to grow.
Let me know if you try it out and have any comments. I'm going to wait for 0.7 or 0.8 to post it to c.l.p.announce, but early early adopters are always welcome ;).
Why emacs and vim?
Mark Williamson asked why emacs and vim?
I use emacs for programming -- one persistent emacs window, many buffers -- and vim for answering e-mail. I like vim because the typeahead is really simple and obvious. I like emacs because I know how to deal with multiple buffers by keystroke, it has all of the commands documented, and I've been using it for over a decade. Decade and a half, now, come to think of it.
So why should I change?? What compelling new feature(s) am I missing out on?
--titus the old fogy ;)
