[twill] Twill v0.8.1
titus at caltech.edu
Thu Jan 5 10:36:06 PST 2006
On Thu, Jan 05, 2006 at 07:50:59AM -0500, Lowe, Iain wrote:
-> Hi Titus,
-> I am using twill in a project and I have noticed a couple of things I
-> thought I would mention. First off, the documentation on your site says that
-> to turn off twill's debug messages you execute "debug('twill', '0')". This
-> is incorrect as the current code requires you to use "commands" instead of
-> "twill". Also, the "go" function still prints out the URL it is at each time
-> it moves the "browser". Secondly, I was wondering if there is a way to get
-> the source of the page I am browsing. The "show" function should probably
-> return the current source as well as print it to STDOUT but I can't seem to
-> find anything that does this. Can you provide any guidance?
I'll fix the documentation for the debug command - thanks!
The commands in 'commands.py' are tied directly to the scripting
language and intentionally don't have return values; I'm still thinking
about how to deal with this. It's been requested enough that I may
cave and simply put in return values ;).
Here's a short snippet of code that should solve some of your problems:
from twill import get_browser
b = get_browser()
html = b.get_html()
I'm glad you're using twill! thanks for reporting the bugs ;).
More information about the twill