From bdf9099df8c2a4636b0ad0e710b73330877eef37 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Fri, 24 Oct 2014 19:59:05 +0200 Subject: Very cleaner, much class, such readable, wow --- sysproxy.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sysproxy.py (limited to 'sysproxy.py') diff --git a/sysproxy.py b/sysproxy.py new file mode 100644 index 0000000..81867ad --- /dev/null +++ b/sysproxy.py @@ -0,0 +1,7 @@ +import urllib.request + + +def configure_system_proxy(): + proxy = urllib.request.ProxyHandler(urllib.request.getproxies()) + opener = urllib.request.build_opener(proxy) + urllib.request.install_opener(opener) -- cgit v1.2.3