diff options
author | Pacien TRAN-GIRARD | 2014-10-24 19:59:05 +0200 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2014-10-24 19:59:05 +0200 |
commit | bdf9099df8c2a4636b0ad0e710b73330877eef37 (patch) | |
tree | 63fd704f15f3030f1455aad0ef92403c5d093c70 /sysproxy.py | |
parent | 16529a0d212e1387eacd590c0e5e1b1a13dc2641 (diff) | |
download | wikistats-bdf9099df8c2a4636b0ad0e710b73330877eef37.tar.gz |
Very cleaner, much class, such readable, wow
Diffstat (limited to 'sysproxy.py')
-rw-r--r-- | sysproxy.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sysproxy.py b/sysproxy.py new file mode 100644 index 0000000..81867ad --- /dev/null +++ b/sysproxy.py | |||
@@ -0,0 +1,7 @@ | |||
1 | import urllib.request | ||
2 | |||
3 | |||
4 | def configure_system_proxy(): | ||
5 | proxy = urllib.request.ProxyHandler(urllib.request.getproxies()) | ||
6 | opener = urllib.request.build_opener(proxy) | ||
7 | urllib.request.install_opener(opener) | ||