Script(env,
path,
interpreter=None,
args=[ ] ,
infiles=[ ] ,
output=[ ] ,
depends=[ ] ,
capture_stdout=None)
| source code
|
Create a task for running a local script.
This is a command that runs a local script, intended for processing input
datafiles to output data files. It work like External, except that the
script itself is made a dependency for this step. Thus ,alterations in the
script will trigger rerunning. All undescribed parameters are as per External.
For example:
>>> env = SconsEnv()
>>> make_clean_data = Script ('Scripts/clean.py',
... args = ['--save-as', 'output.txt'],
... infiles = ['indata.txt'],
... output = 'output.txt',
... )
>>> type_data = Script ('count_types.pl',
... interpreter = 'perl',
... args = ['--use-types', 'type_data.csv'],
... infiles = ['clean_data.txt'],
... depends = 'type_config.txt',
... capture_stdout='captured-types.txt',
... )
- Parameters:
path (str) - Pathway to the script
interpreter - Interpreter to run the script with. If None, assume it is python.
|