All Samples(245) | Call(55) | Derive(165) | Import(25)
Derived class with handlers for errors we can handle (perhaps).
src/m/2/m2m-HEAD/trunk/src/vscp/samples/python/vscp_temp.py m2m(Download)
#!usr/bin/env python
import socket
import sys
import urllib
url = "http://tinyurl.com/temperaturLos" #Url till yr.no:s rss-feed
opener = urllib.FancyURLopener({})
src/a/w/awslib-HEAD/ec2example.py awslib(Download)
secret_key="<AWS secret key>"
ec2 = ec2driver(access_key, secret_key)
curl = urllib.FancyURLopener({})
uri = ec2.build_uri(
"GET",
src/m/2/m2m-HEAD/src/vscp/samples/python/vscp_temp.py m2m(Download)
#!usr/bin/env python
import socket
import sys
import urllib
url = "http://tinyurl.com/temperaturLos" #Url till yr.no:s rss-feed
opener = urllib.FancyURLopener({})
src/p/y/python-cookbook-HEAD/cb2_examples/cb2_14_6_sol_1.py python-cookbook(Download)
class myURLOpener(urllib.FancyURLopener):
""" Subclass to override err 206 (partial file being sent); okay for us """
def http_error_206(self, url, fp, errcode, errmsg, headers, data=None):
pass # Ignore the expected "non-error" code
def getrest(dlFile, fromUrl, verbose=0):
myUrlclass = myURLOpener()
if os.path.exists(dlFile):
src/g/1/g15m-HEAD/trunk/lglcd/Examples/Updater.py g15m(Download)
def main():
#--------------------------------------------------
# Initialize LCD screen and setup txt handles
#--------------------------------------------------
CEzLcd.OnDownload = OnDownload
lcd = CEzLcd("Python Updater", 160, 43)
urlOpener = urllib.FancyURLopener()
src/g/1/g15m-HEAD/lglcd/Examples/Updater.py g15m(Download)
def main():
#--------------------------------------------------
# Initialize LCD screen and setup txt handles
#--------------------------------------------------
CEzLcd.OnDownload = OnDownload
lcd = CEzLcd("Python Updater", 160, 43)
urlOpener = urllib.FancyURLopener()
src/f/l/flother-HEAD/flother/utils/geonames/__init__.py flother(Download)
def _do(url, http_proxy):
proxies = getProxies(http_proxy)
u = urllib.FancyURLopener(proxies)
usock = u.open(url)
rawdata = usock.read()
if DEBUG: print rawdata
xmldoc = minidom.parseString(rawdata)
url = _buildpostalCodeLookupJSON(postalcode,placename,country,maxRows,gcallback)
# print url
proxies = getProxies(http_proxy)
u = urllib.FancyURLopener(proxies)
usock = u.open(url)
rawdata = usock.read()
if DEBUG: print rawdata
src/d/a/daneel-ai-HEAD/libtpproto-py/tp/netlib/client.py daneel-ai(Download)
# use enviroment varibles
if proxy == None:
opener = urllib.FancyURLopener()
elif proxy == "":
# Don't use any proxies
opener = urllib.FancyURLopener({})
src/r/e/retic-HEAD/jyretic_eai_server/trunk/preprocessors/SOAPPreproc.py retic(Download)
reticLog.logInfo(self.logList, "Executing SOAP request")
reticLog.logDebug(self.logList, "SOAP Request : " + SOAPMessage)
if self.proxyUrl <> '':
urlopener = urllib.FancyURLopener( {'http' : self.proxyUrl } )
else:
urlopener = urllib.URLopener()
urlopener.addheaders.append(('Content-Length', str(len(SOAPMessage))))
src/t/p/tpserver-py-HEAD/libtpproto-py/tp/netlib/client.py tpserver-py(Download)
# use enviroment varibles
if proxy == None:
opener = urllib.FancyURLopener()
elif proxy == "":
# Don't use any proxies
opener = urllib.FancyURLopener({})
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next