psychopy.web
- Web methods¶
Test for access¶
- psychopy.web.haveInternetAccess(forceCheck=False)[source]¶
Detect active internet connection or fail quickly.
If forceCheck is False, will rely on a cached value if possible.
- psychopy.web.requireInternetAccess(forceCheck=False)[source]¶
Checks for access to the internet, raise error if no access.
Proxy set-up and testing¶
- psychopy.web.setupProxy(log=True)[source]¶
Set up the urllib proxy if possible.
The function will use the following methods in order to try and determine proxies:
standard urllib.request.urlopen (which will use any statically-defined http-proxy settings)
previous stored proxy address (in prefs)
proxy.pac files if these have been added to system settings
auto-detect proxy settings (WPAD technology)
- Return type:
True (success) or False (failure)