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

Stephen Thorne stephen at netboxblue.com
Mon Mar 27 16:12:46 PST 2006


Do, Uy N wrote:
> I searched the archive but didn’t see any thing like saving the text on 
> the screen to a log file yet. I’m pretty sure it’s easier to read a log 
> 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?

That's very odd. I don't have access to a windows platform, but I did 
the following:

?0:sthorne at wendy src/twill $twill-sh
  -= Welcome to twill! =-

current page:  *empty page*
 >> redirect_output somefile.txt
current page:  *empty page*
 >> go http://shiny.thorne.id.au/~stephen/tiny.html
current page: http://shiny.thorne.id.au/~stephen/tiny.html
 >> show
current page: http://shiny.thorne.id.au/~stephen/tiny.html
 >> exit

and then the file somefile.txt contained the following:

?0:sthorne at wendy src/twill $cat somefile.txt
==> at http://shiny.thorne.id.au/~stephen/tiny.html
<html>
hi
</html>

It might be that there's a problem with redirect_output on the windows 
platform. There are no tests for this behaviour at the moment, and I 
don't have access to a windows machine, maybe Titus or someone else on 
the list can confirm that it doesn't work correctly.
-- 
Regards,
Stephen Thorne
Development Engineer

Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)







More information about the twill mailing list