def maybe_download(filename, work_directory):
 if (not os.path.exists(work_directory)):
  os.mkdir(work_directory)
 filepath = os.path.join(work_directory, filename)
 if (not os.path.exists(filepath)):
  (filepath, _) = urllib.urlretrieve((SOURCE_URL + filename), filepath)
  statinfo = os.stat(filepath)
  print('Succesfully downloaded', filename, statinfo.st_size, 'bytes.')
 return filepath

def maybe_download ( filename , work_directory ) : if ( not os . path . exists ( work_directory ) ) : os . mkdir ( work_directory ) filepath = os . path . join ( work_directory , filename ) if ( not os . path . exists ( filepath ) ) : ( filepath , _ ) = urllib . urlretrieve ( ( SOURCE_URL + filename ) , filepath ) statinfo = os . stat ( filepath ) print ( 'Succesfully downloaded' , filename , statinfo . st_size , 'bytes.' ) return filepath
download a set of files in temporary local folder .