ANN: ClientForm 0.0.9 and 0.1.2a released

John J. Lee
09 Jun 2003 20:57:06 +0100

A new stable and development release.

Changes since 0.0.8:
 * Added nr argument to method.  Multiple click-able
   controls with the same name are now accessible.
 * HTMLForm.__str__ is clearer and more useful (since the few remaining
   control types that didn't have their own class anyway now have dummy
   classes, you can distinguish all control types -- except the ones
   implemented by IgnoreControl).
 * Example code at
   (requires ClientCookie).

The 0.1.2a development release (with possibly-working file upload --
single files only ATM) has equivalent changes, plus a bugfix.  I will
continue to fix any bugs in the current stable version (0.0.x) for the
foreseeable future.

Interface changes from 0.0.x to 0.1.x (there are more changes to come
before a beta release):

 * Removed items argument to method, and added
   click_items and click_request_data methods.  Removed items and
   make_request methods from HTMLForm.  Made
   method private -- is now named _click, and is only called by
 * IsindexControl is now clickable, and isindex_url has been removed,
   since it was essentially pointless.
 * Changed SelectControl so it has an attrs dict of HTML attributes.
   SELECT and OPTION HTML attributes are now separate.

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(""))
 form = forms[0]
 print form
 form["author"] = "Gisle Aas"

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