(self, fileurl, dlfile)
Download a file.
Download a file.
Download a file .
def DownloadFile(self, fileurl, dlfile):
    """Download a file."""
    try:
      file_to_dl = urllib2.urlopen(fileurl)
      tmpfile = open(dlfile, 'wb')
      shutil.copyfileobj(file_to_dl, tmpfile)
    except urllib2.URLError, e:
      print 'Download of %s failed with error %s' % (fileurl, e)
      sys.exit()
    except IOError, e:
      print 'Could not write %s to disk; check disk permissions!' % dlfile
      print 'Error: %s' % e
      sys.exit()
def DownloadFile ( self , fileurl , dlfile ) : try : file_to_dl = urllib2 . urlopen ( fileurl ) tmpfile = open ( dlfile , 'wb' ) shutil . copyfileobj ( file_to_dl , tmpfile ) except urllib2 . URLError , e : print 'Download of %s failed with error %s' % ( fileurl , e ) sys . exit ( ) except IOError , e : print 'Could not write %s to disk; check disk permissions!' % dlfile print 'Error: %s' % e sys . exit ( )