An example is:
python script1.py arg1 arg2
python script2.py arg1
where arg1 is from the first python call
An example is:
python script1.py arg1 arg2
python script2.py arg1
where arg1 is from the first python call
How does script1 return its result? If it’s in stdout, try:
python script2.py $(python script1.py arg1 arg2)
$(…)
runs the first script and takes the stdout output as the argument for the second script.
It is a matter of taste, to use either $(...) or backticks, I like backticks more:
python script2.py `python script1.py arg1 arg2`