[twill] Logging

C. Titus Brown ctb at msu.edu
Mon Sep 29 15:48:12 PDT 2008


On Mon, Sep 29, 2008 at 03:46:23PM -0700, Jeremiah Jester wrote:
-> Any idea why I get a parse error when trying to log errors from python?
-> 
-> Import twill.command as Tw
-> Def start_log():
->      Tw.redirect_output output.log
->      Tw.redirect_error error.log
-> 
-> Says invalid syntax. Adding qoutes does not solve the peoblem

def start_log():
  Tw.redirect_output('output.log')
  Tw.redirect_error('error.log')

Twill is basically a very thing wrapping around Python, so you can
extend it in Python -- but you have to obey Python syntax rules when
doing so :)

cheers,
--titus



More information about the twill mailing list