Some of the commands in my python code uses the internet to download the required files. Unfortunately I am using a proxy internet connection.
I am aware that these commands are used for getting internet in cmd.exe( I tried manually by typing the below mentioned commands in cmd prompt and later accessing net in the same)
set http_proxy=http://username:password@your_proxy:your_port
set https_proxy=https://username:password@your_proxy:your_port
But, I am unable to pass these commands from python code itself so that I need not type them manually every time I run a code. Some of the links would be using http and others use https. how should i address this in the code?
I tried this but it did not worked :
import os
proxy = "set https_proxy=https://username:password@your_proxy:your_port"
os.system(proxy)
import numpy
...........my code........
where I was wrong and what is the correct procedure to achieve my requirement ? And can I use subprocess in this case ?