So for my application, I'm using 
urllib.getproxies() to detect proxy settings.
The function runs well when I call it from a python shell.
But when my application runs as a service (and only when it runs as a service),
urllib.getproxies() returns me an empty dictionary.
I'm using windows 2008 R2 and python 2.7.
Do you guys have any idea where it could come from ?
Thanks
So the answer is that on windows proxy system settings are stored in the registry under
HKEY_CURRENT_USER
So as the service runs under a special user it can't find it in its HKEY_CURRENT_USER.
The solutions:
1. Run the service under another user.
2. Read the proper user registry
Python urllib.getproxies() on windows doesn't work when run as a service