I have a bash script that sets an environment variable an runs a command
LD_LIBRARY_PATH=my_path sqsub -np $1 /homedir/anotherdir/executable
You can add elements to your environment by using
os.environ['LD_LIBRARY_PATH'] = 'my_path'
and run subprocesses in a shell (that uses your os.environ) by using
os.environ
subprocess.call('sqsub -np ' + var1 + '/homedir/anotherdir/executable', shell=True)