Python script is executable and can be used directly needed:
- shebang in python script
- Python script must be exectuable (+x)
Call script with python
Use wrapper script (has to be exectuble)
included in standard python installation Docu: https://docs.python.org/3/library/argparse.html
Docu: https://palletsprojects.com/p/click/
often used, but not recommended: no checks or documentation of arguments
example.py one of the python example scripts from above (with shebang and executable rights)
Call python script if different arguments
execute with
condor_submit test.submit
use shell script to generate submit file via loop to avoid adding arguments manually
run with
./generate_submit.sh | condor_submit
use wrapper script instead of calling the python script directly
run with
./generate_submit.sh | condor_submit
To use multiple scripts without having to rewrite a wrapper script for each of them, a generalized wrapper script can be used. This helps in avoiding duplication.
usage of wrapper script:
./wrapper_script.sh <script path> <optional script parameter>