[twill] How to output text on the screen to a log file

Do, Uy N Uy_Do at reyrey.com
Tue Mar 28 06:44:57 PST 2006

I updated to the latest egg (twill-0.8.5a1-py2.4.egg) on windows using
easy_install and it worked like a charm.
I didn't open the file while I ran the script. Actually, I tried both
versions using twill-sh script and python script but the result was the
same. The file was still there after I exited twill, but its filesize is
0 byte as I said. 
One more thing to say about twill, when I ran the script (either
twill-sh or python) I always have a warning/message when I use go
('http://url'), given the url is localhost or www.ebay.com : "The
process cannot access the file because it is being used by another
process" and it still ran to the end of the script just fine. 
Do you have any clue what it was?
Thanks for your prompt response!

-----Original Message-----
From: Titus Brown [mailto:titus at caltech.edu] 
Sent: Tuesday, March 28, 2006 12:00 AM
To: Do, Uy N
Cc: twill at lists.idyll.org
Subject: Re: [twill] How to output text on the screen to a log file

On Mon, Mar 27, 2006 at 06:38:32PM -0500, Do, Uy N wrote:
-> Hi, 
-> I searched the archive but didn't see any thing like saving the text
-> the screen to a log file yet. I'm pretty sure it's easier to read a
-> file if we have a long task to run.
-> I tried to use the redirect_output command but the file always has 0
-> byte.
-> Oh, I'm using twill on a windows platform PC. 
-> Any idea how I can do this?

Hi, Uy,

is the file still 0 bytes after you exit twill?  Or are you looking at
the file while twill-sh is still running?

I should probably add a command-line option to send all output to a


p.s. Separate q -- are you running twill 0.8.4?  I'm curious about how
well the install works on Windows.

More information about the twill mailing list