[twill] twill browser object and form values
C. Titus Brown
ctb at msu.edu
Sat Mar 21 08:02:53 PDT 2009
On Fri, Mar 20, 2009 at 11:42:55PM -0700, Iain Duncan wrote:
-> On Fri, 2009-03-20 at 23:25 -0700, Iain Duncan wrote:
-> > Hi folks, I'm not clear from the docs how to submit form values using
-> > the browser object. It does not have a method called 'fv' to match the
-> > twill command set. Any help appreciated!
-> Ok, I figured out that I can switch to using twill commands and that
-> works fine, but I think it would be nicer if one could do
-> browser.fv( etc )
-> Is there any chance of that happening or is twill sort of done as is
-> right now?
I don't disagree, but I am also trying to balance this against
simplicity & the proper separation of layers. Right now we have
commands.py -- top-level/single-browser object commands like 'fv',
browser.py -- a wrapper around mechanize to provide a few nice
convenience functions and hooks
mechanize -- what actually does the work.
To implement your suggestion, I'd want to add another layer between
commands.py and browser.py that didn't deal with low level decision
making (like the current browser) but was also not singleton-attached
like the commands.py functions. Does this add to the complexity of
twill in a bad way?
I've thought about doing what you suggested before, but always rejected
it on intuition as being too enterprise-y. Maybe it's time to
revisit... any other thoughts?
C. Titus Brown, ctb at msu.edu
More information about the twill