It doesn’t work, the file doesn’t get uploaded. I get no results in popenResult.communicate, etc.
But if I type this into python running outside of touchdesigner, it works fine (once I hardcode the directory as there is no ‘project.folder’ from the python shell).
So I have an external script, “testUpload.py” and it imports the requests module.
As it seems difficult to follow the script as it goes, i have it writing its output to a file, and i’m outputting a line every line that it executes. It dies as soon as I try to import the requests module in “testUpload.py”
Essentially the problem is that once i’m in the testUpload environment, it can’t access the site-packages that are installed in the OS, so maybe environment variables aren’t the same under pOpen?