At a certain point in the execution of my Python script, I want to call cURL on the Windows command line, like so:
import subprocess
subprocess.call('curl', shell=True)
But I get this error:
'curl' is not recognized as an internal or external command, operable program or batch file.
Same thing happens if I use the full path:
subprocess.call('C:\\Windows\\System32\\curl.exe', shell=True)
'curl' is not recognized as an internal or external command, operable program or batch file.
Yet, if I simply open my Windows command prompt and type in 'curl', it works:
curl: try 'curl --help' for more information
Why?
(curl is in my Environment Variables, and my Visual C++ Redistributables are up-to-date. I am using Windows 10 Home on x64 machine.)
Thanks for your help!