ANN: ClientForm 0.0.8 released

John J. Lee jjl@pobox.com
03 Jun 2003 14:48:10 +0100


http://wwwsearch.sourceforge.net/ClientForm/

This stable release fixes two very minor, but very annoying, bugs:

Changes since 0.0.7:
 * Fixed HTMLForm.__str__ so it returns something useful again.
 * Added documentation explaining the peculiar single-checkbox-with-
   missing-value-attribute case (the peculiarity here is not my fault!).

Requires Python >= 1.5.2.

ClientForm is a Python module for handling HTML forms on the client
side, useful for parsing HTML forms, filling them in and returning the
completed forms to the server.  It has developed from a port of Gisle
Aas' Perl module HTML::Form, from the libwww-perl library, but the
interface is not the same.

Simple example:

 from urllib2 import urlopen
 from ClientForm import ParseResponse

 forms = ParseResponse(urlopen("http://www.acme.com/form.html"))
 form = forms[0]
 form["author"] = "Gisle Aas"

 # form.click returns a urllib2.Request object
 # (see HTMLForm.click.__doc__ if you don't have urllib2)
 response = urlopen(form.click("Thanks"))


John