def get_data_path(data, module, check_exists=True):
    """return a directory path to data within a module

    Parameters
    ----------
    data : str or list[str]
        file name or list of sub-directories
        and file name (e.g. ['lammps','data.txt'])

    """
    basepath = os.path.dirname(os.path.abspath(inspect.getfile(module)))

    if isinstance(data, basestring):
        data = [data]

    dirpath = os.path.join(basepath, *data)

    if check_exists:
        assert os.path.exists(dirpath), '{0} does not exist'.format(dirpath)

    return pathlib.Path(dirpath)
def get_data_path ( data , module , check_exists = True ) : basepath = os . path . dirname ( os . path . abspath ( inspect . getfile ( module ) ) ) if isinstance ( data , basestring ) : data = [ data ] dirpath = os . path . join ( basepath , * data ) if check_exists : assert os . path . exists ( dirpath ) , '{0} does not exist' . format ( dirpath ) return pathlib . Path ( dirpath )
return a directory path to data within a module

    Parameters
    ----------
    data : str or list[str]
        file name or list of sub-directories
        and file name (e.g. ['lammps','data.txt'])