I have a simple script that i use to invoke another script, which succeeds returns an id. Atm the most convenient method i see is as follows.
#scriptA.py
x =doOperations(x=1231)
exit(x)
.
#scriptB.py
result = procScriptA.returncode()
Is there any harm in doing that, i kinda have the feeling that i am exploiting the exit functionality, but is there any other way without outputting to stderr or stdout?
I read this already: Best way to return a value from a python script