#NEWLINE# @ verbose #NEWLINE# def data_path( url , path = None , force_update = False , update_path = None , verbose = None ) : #NEWLINE# #INDENT# 'Get path to local copy of EEGMMI dataset URL\n\n    This is a low-level function useful for getting a local copy of a\n    remote EEGBCI dataet.\n\n    Parameters\n    ----------\n    url : str\n        The dataset to use.\n    path : None | str\n        Location of where to look for the EEGBCI data storing location.\n        If None, the environment variable or config parameter\n        MNE_DATASETS_EEGBCI_PATH is used. If it doesn\'t exist, the\n        "mne-python/examples" directory is used. If the EEGBCI dataset\n        is not found under the given path (e.g., as\n        "mne-python/examples/MNE-eegbci-data"), the data\n        will be automatically downloaded to the specified folder.\n    force_update : bool\n        Force update of the dataset even if a local copy exists.\n    update_path : bool | None\n        If True, set the MNE_DATASETS_EEGBCI_PATH in mne-python\n        config to the given path. If None, the user is prompted.\n    verbose : bool, str, int, or None\n        If not None, override default verbose level (see mne.verbose).\n\n    Returns\n    -------\n    path : list of str\n        Local path to the given data file. This path is contained inside a list\n        of length one, for compatibility.\n\n    Notes\n    -----\n    For example, one could do:\n\n        >>> from mne.datasets import eegbci\n        >>> url = \'http://www.physionet.org/physiobank/database/eegmmidb/\'\n        >>> eegbci.data_path(url, os.getenv(\'HOME\') + \'/datasets\') # doctest:+SKIP\n\n    This would download the given EEGBCI data file to the \'datasets\' folder,\n    and prompt the user to save the \'datasets\' path to the mne-python config,\n    if it isn\'t there already.\n\n    The EEGBCI dataset is documented in the following publication:\n        Schalk, G., McFarland, D.J., Hinterberger, T., Birbaumer, N.,\n        Wolpaw, J.R. (2004) BCI2000: A General-Purpose Brain-Computer Interface\n        (BCI) System. IEEE TBME 51(6):1034-1043\n    The data set is available at PhysioNet:\n        Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG,\n        Mietus JE, Moody GB, Peng C-K, Stanley HE. (2000) PhysioBank,\n        PhysioToolkit, and PhysioNet: Components of a New Research Resource for\n        Complex Physiologic Signals. Circulation 101(23):e215-e220\n    ' #NEWLINE# key = 'MNE_DATASETS_EEGBCI_PATH' #NEWLINE# name = 'EEGBCI' #NEWLINE# path = _get_path ( path , name , name ) #NEWLINE# destination = _url_to_local_path ( url , op . join ( path , 'MNE-eegbci-data' ) ) #NEWLINE# destinations = [ destination ] #NEWLINE# if ( ( not op . isfile ( destination ) ) or force_update ) : #NEWLINE# #INDENT# if op . isfile ( destination ) : #NEWLINE# #INDENT# os . remove ( destination ) #NEWLINE# #UNINDENT# if ( not op . isdir ( op . dirname ( destination ) ) ) : #NEWLINE# #INDENT# os . makedirs ( op . dirname ( destination ) ) #NEWLINE# #UNINDENT# _fetch_file ( url , destination , print_destination = False ) #NEWLINE# #UNINDENT# _do_path_update ( path , update_path , key , name ) #NEWLINE# return destinations