To make the next Python command in this Command Prompt receive the proxy immediately, set its current environment:

set "HTTP_PROXY=http://proxy.example:8080"
set "HTTPS_PROXY=http://proxy.example:8080"
python download.py

For a permitted public download without proxy authentication, replace the endpoint with a candidate from the HTTP proxy list and use the intended script. These values last in that shell until changed or it closes. If the intention is to persist a value for future sessions, that is a separate action:

setx HTTPS_PROXY "http://proxy.example:8080"

setx writes the persistent environment; it does not replace the block already held by cmd.exe. A later child launched from the old window can therefore inherit the old value.

The same applies to an IDE or terminal host. A new tab is not proof that the long-running launcher refreshed its environment. Relaunch the affected application from a launcher with updated values.

Setx defaults to user scope; /m targets system scope with corresponding privileges. Services and other users' jobs are separate consumers. Both shown URLs are HTTP intermediaries; HTTPS_PROXY names the destination scheme, and Python's actual library still has to support the input. It does not proxy arbitrary raw sockets.

Ũhoro ũhĩtĩte