Skip to content

Instantly share code, notes, and snippets.

Kyle Owens owensk

Block or report user

Report or block owensk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:a9b17a97c24b130d79f1
### Keybase proof
I hereby claim:
* I am owensk on github.
* I am kowens (https://keybase.io/kowens) on keybase.
* I have a public key whose fingerprint is 52EB 6C0D DFB4 FA51 9BED D370 EE28 7842 1AB4 B0CE
To claim this, I am signing this object:
@owensk
owensk / registry_requests_gist.py
Last active Dec 16, 2015
Fetching proxy information from windows registry for use in Requests python module.
View registry_requests_gist.py
import _winreg as winreg
import requests
def get_internet_key(name):
ie_settings = winreg.OpenKey(winreg.HKEY_CURRENT_USER,r'Software\Microsoft\Windows\CurrentVersion\Internet Settings',0, winreg.KEY_ALL_ACCESS)
value, type = winreg.QueryValueEx(ie_settings, name)
return value
def hasInternetProxy():
"""Returns boolean. If key doesn't exist, returns false."""
You can’t perform that action at this time.