Is there any way to call a shell script and use the functions/variable defined in the script from python?
The script is unix_shell.sh
#!/bin/bash fun
Yes, in a similar way to how you would call it from another bash script:
import subprocess subprocess.check_output(['bash', '-c', 'source unix_shell.sh && foo'])