calcrepo/repo.py
def downloadFileFromUrl(self, url):
		"""Given a URL, download the specified file"""
		fullurl = self.baseUrl + url
		try:
			urlobj = urllib2.urlopen(fullurl)
			contents = urlobj.read()
		except urllib2.HTTPError, e:
			self.printd("HTTP error:", e.code, url)
			return None
		except urllib2.URLError, e:
			self.printd("URL error:", e.code, url)
			return None
		self.printd("Fetched '%s' (size %d bytes)" % (fullurl, len(contents)))
		return contents
Given a URL, download the specified file
Given a URL, download the specified file
Given a URL download the specified file
def downloadFileFromUrl(self, url):
		fullurl = self.baseUrl + url
		try:
			urlobj = urllib2.urlopen(fullurl)
			contents = urlobj.read()
		except urllib2.HTTPError, e:
			self.printd("HTTP error:", e.code, url)
			return None
		except urllib2.URLError, e:
			self.printd("URL error:", e.code, url)
			return None
		self.printd("Fetched '%s' (size %d bytes)" % (fullurl, len(contents)))
		return contents
def downloadFileFromUrl ( self , url ) : fullurl = self . baseUrl + url try : urlobj = urllib2 . urlopen ( fullurl ) contents = urlobj . read ( ) except urllib2 . HTTPError , e : self . printd ( "HTTP error:" , e . code , url ) return None except urllib2 . URLError , e : self . printd ( "URL error:" , e . code , url ) return None self . printd ( "Fetched '%s' (size %d bytes)" % ( fullurl , len ( contents ) ) ) return contents
Given a URL, download the specified file
Given a URL download the specified file
"""Given a URL, download the specified file"""
self
url