You can't... Try return "data" which is the only way to go. Unless you want to catch the output of another python script, then you can use x = subprocess.Popen("python script.py", shell=True") and then x.stdout.read(). Might (and i mean might.. only thought about it for a second) be able to use eval() to call the function and there catch the output.. But wouldn't reccomend it..
return "data"which is the only way to go. Unless you want to catch the output of another python script, then you can usex = subprocess.Popen("python script.py", shell=True")and thenx.stdout.read(). Might (and i mean might.. only thought about it for a second) be able to useeval()to call the function and there catch the output.. But wouldn't reccomend it..returnprintfunction and have it collect the data somewhere else.dis.dis()also usesprint; see the linked duplicate on how you could work around that.