def load_data_file(fname, directory=None, force_download=False):
 _url_root = 'http://github.com/vispy/demo-data/raw/master/'
 url = (_url_root + fname)
 if (directory is None):
  directory = config['data_path']
  if (directory is None):
   raise ValueError('config["data_path"] is not defined, so directory must be supplied')
 fname = op.join(directory, op.normcase(fname))
 if op.isfile(fname):
  if (not force_download):
   return fname
  if isinstance(force_download, string_types):
   ntime = time.strptime(force_download, '%Y-%m-%d')
   ftime = time.gmtime(op.getctime(fname))
   if (ftime >= ntime):
    return fname
   else:
    print ('File older than %s, updating...' % force_download)
 if (not op.isdir(op.dirname(fname))):
  os.makedirs(op.abspath(op.dirname(fname)))
 _fetch_file(url, fname)
 return fname

def load_data_file ( fname , directory = None , force_download = False ) : _url_root = 'http://github.com/vispy/demo-data/raw/master/' url = ( _url_root + fname ) if ( directory is None ) : directory = config [ 'data_path' ] if ( directory is None ) : raise ValueError ( 'config["data_path"] is not defined, so directory must be supplied' ) fname = op . join ( directory , op . normcase ( fname ) ) if op . isfile ( fname ) : if ( not force_download ) : return fname if isinstance ( force_download , string_types ) : ntime = time . strptime ( force_download , '%Y-%m-%d' ) ftime = time . gmtime ( op . getctime ( fname ) ) if ( ftime >= ntime ) : return fname else : print ( 'File older than %s, updating...' % force_download ) if ( not op . isdir ( op . dirname ( fname ) ) ) : os . makedirs ( op . abspath ( op . dirname ( fname ) ) ) _fetch_file ( url , fname ) return fname
get a standard vispy demo data file parameters fname : str the filename on the remote demo-data repository to download .