[twill] passing parameters to twill scripts
titus at caltech.edu
Fri Mar 24 08:55:06 PST 2006
On Fri, Mar 24, 2006 at 09:09:09AM +0100, Michele Simionato wrote:
-> On 3/23/06, Titus Brown <titus at caltech.edu> wrote:
-> > What do you think about adding a '--' separator to the twill-sh command
-> > line, so that you can do things like
-> > twill-sh test.twill -- arg1 arg2 arg3
-> > ?
-> What do you mean? In this way the args could be interpreted without importing
-> argparse explicitely? For instance if I had two similar scripts depending each
-> on three parameters, would
-> $ twill-sh test1.twill test2.twill-- arg1 arg2 arg3
-> call both test1 and test2 with the same arguments arg1, arg2 and arg3?
That's the idea.
twill-sh file1 file2 arg1 arg2
tries to run 'file1', 'file2', 'arg1', 'arg2'. There's no way to
differentiate between that and
twill-sh file1 arg1 arg2
which would be useful. So,
twill-sh file1 -- arg1 arg2
is one way to separate the filenames from the options.
I do want to keep the behavior with 'twill-sh file1 file2 ... fileN' the
same; it's a very handy way to run multiple tests all at one time.
More information about the twill