TWILL IS NEAT TOO $ twill-sh -u http://blog.tplus1.com ==> at http://blog.tplus1.com -= Welcome to twill! =- current page: http://blog.tplus1.com >> >> code 200 current page: http://blog.tplus1.com >> find mushrooms ERROR: no match to 'mushrooms' >> showforms Form #1 ## ## __Name__________________ __Type___ __ID________ __Value__________________ 1 email text (None) 2 url hidden (None) http://feeds.feedburner.com/~e?ffid= ... 3 title hidden (None) t+1: Matt Wilson's blog 4 loc hidden (None) en_US 5 1 None submit (None) Subscribe Form #2 ## ## __Name__________________ __Type___ __ID________ __Value__________________ 1 q text sbi 2 1 sa submit sbb Search 3 sitesearch radio ss0 [''] of ['', 'blog.tplus1.com'] 4 client hidden (None) pub-2885042656955977 5 forid hidden (None) 1 6 channel hidden (None) 3541383188 7 ie hidden (None) ISO-8859-1 8 oe hidden (None) ISO-8859-1 9 cof hidden (None) GALT:#008000;GL:1;DIV:#336699;VLC:66 ... 10 hl hidden (None) en current page: http://blog.tplus1.com It is easy to use forms with twill: >> fv 1 email matt@tplus1.com current page: http://blog.tplus1.com >> submit 5 Note: submit is using submit button: name="None", value="Subscribe" Twill has some good extensions: >> extend_with require Imported extension module 'require'. (at /usr/lib/python2.5/site-packages/twill-0.9-py2.5.egg/twill/extensions/require.pyc) Description: A simple set of extensions to manage post-load requirements for pages. Commands: require -- turn on post-load requirements; either 'success' or 'links_ok'. no_require -- turn off requirements. skip_require -- for the next page visit, skip requirements processing. flush_visited -- flush the list of already visited pages (for links checking) current page: http://blog.tplus1.com >> require success current page: http://blog.tplus1.com >> require links_ok current page: http://blog.tplus1.com And you can write your own extensions easily: >> extend_with tweed Imported extension module 'tweed'. (at /home/matt/svn-checkouts/tweed/tweed/__init__.py) Description: Some twill-related nonsense. current page: http://blog.tplus1.com >> no_nested_tables ERROR: 1998 called and it wants its web design back. current page: http://blog.tplus1.com >> run_on_page_load no_nested_tables current page: http://blog.tplus1.com >> help run_on_page_load =============== Help for command run_on_page_load: Run the function named funcname on every page load. =============== current page: http://blog.tplus1.com >> no_require current page: http://blog.tplus1.com >> reload ERROR: 1998 called and it wants its web design back. current page: http://blog.tplus1.com >> You can also run twill against a WSGI app in process, but I don't know how to do that. You can (of course) use twill as a python library rather than a separate app: In [1]: import twill.commands In [2]: twill.commands Out[2]: In [3]: _2.go("http://blog.tplus1.com") ==> at http://blog.tplus1.com Out[3]: 'http://blog.tplus1.com' In [4]: _2.showforms() Form #1 ## ## __Name__________________ __Type___ __ID________ __Value__________________ 1 email text (None) 2 url hidden (None) http://feeds.feedburner.com/~e?ffid= ... 3 title hidden (None) t+1: Matt Wilson's blog 4 loc hidden (None) en_US 5 1 None submit (None) Subscribe Form #2 ## ## __Name__________________ __Type___ __ID________ __Value__________________ 1 q text sbi 2 1 sa submit sbb Search 3 sitesearch radio ss0 [''] of ['', 'blog.tplus1.com'] 4 client hidden (None) pub-2885042656955977 5 forid hidden (None) 1 6 channel hidden (None) 3541383188 7 ie hidden (None) ISO-8859-1 8 oe hidden (None) ISO-8859-1 9 cof hidden (None) GALT:#008000;GL:1;DIV:#336699;VLC:66 ... 10 hl hidden (None) en Out[4]: