(self, fileurl, dlfile)
Downloads a given file to a given path/filename.

    Args:
      fileurl: String with URL of file to download.
      dlfile: String with path of file to be written to.
    Raises:
      OSError: If file cannot be opened/written to, function raises OSError.
      URLError: If URL cannot be opened, fucntion raises URLError.
Downloads a given file to a given path/filename.
Downloads a given file to a given path / filename .
def DownloadFile(self, fileurl, dlfile):
    """Downloads a given file to a given path/filename.

    Args:
      fileurl: String with URL of file to download.
      dlfile: String with path of file to be written to.
    Raises:
      OSError: If file cannot be opened/written to, function raises OSError.
      URLError: If URL cannot be opened, fucntion raises URLError.
    """
    if not os.path.isfile(dlfile) or dlfile == TMPINDEX:
      print 'Downloading %s ...' % fileurl
      file_to_dl = urllib2.urlopen(fileurl)
      tmpfile = open(dlfile, 'wb')
      shutil.copyfileobj(file_to_dl, tmpfile)
    else:
      print '%s exists' % dlfile
def DownloadFile ( self , fileurl , dlfile ) : if not os . path . isfile ( dlfile ) or dlfile == TMPINDEX : print 'Downloading %s ...' % fileurl file_to_dl = urllib2 . urlopen ( fileurl ) tmpfile = open ( dlfile , 'wb' ) shutil . copyfileobj ( file_to_dl , tmpfile ) else : print '%s exists' % dlfile