[twill] Variable expansion [PATCH]
Titus Brown
titus at caltech.edu
Fri Mar 3 09:45:13 PST 2006
-> Don't know if I've just reinvented the wheel, but here's a patch which
-> implements expansion of variables within command arguments. e.g.
->
-> setlocal hostname example.com
-> setlocal moreurl abitmoreurl
->
-> go http://${hostname}/someurl/${moreurl}
->
-> This uses the python eval method so you can also do things like ${var1 +
-> var2} to concatenate variables etc.
Hi, Jeff,
this looks fantastic! I would like to write some tests for it before I
actually put it in, but it is certainly not reinventing the wheel.
I was thinking about trying to use Python 2.4's Template mechanism, but
I never got around to seeing if it was possible to make it compatible
with Python 2.3. Do you have any comments on this approach?
thanks!
--titus
More information about the twill
mailing list