I can successfully get Docker with the following command in a bash script: curl -O https://download.docker.com/mac/stable/Docker.dmg > ./Docker.dmg
Now I want to execute the same in Python:
from subprocess import call
call(["curl", "-O", "https://download.docker.com/mac/stable/Docker.dmg", ">", "./Docker.dmg"])
However, I am met with this error when running it:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 123M 100 123M 0 0 25.0M 0 0:00:04 0:00:04 --:--:-- 27.2M
curl: (6) Could not resolve host: >
curl: (7) Failed to connect to port 80: Connection refused
It should be exactly the same bash script, but it doesn't work through the Python script. Should I add something more for it to work? Port?