bash -c 'python /tmp/test.py; echo Exited with code: $?' &> /tmp/all.out
ou
bash -c '(python /tmp/test.py; echo Exited with code: $?) &> /tmp/all.out'
ou
bash -c 'python /tmp/test.py &> /tmp/all.out; echo Exited with code: $? &>> /tmp/all.out'