I am using a subproccess like this to get output from shell.
with subprocess.Popen([\'bash\', \'-c\', \'. /root/myFile.sh;\', \' func