def get_file_path_as_parts(fname):
    """ fname is a python string of the full path to a data file,
    then return the data_dir, file prefix and file suffix
    """
    fnameidx1 = fname.rfind('\\') + 1
    if (fnameidx1 == 0):
        fnameidx1 = fname.rfind('/') + 1
    fnameidx2 = fname.rfind('.')
    data_dir = fname[0: fnameidx1]
    fprefix = fname[fnameidx1: fnameidx2]
    fsuffix = fname[fnameidx2:]
    return (data_dir, fprefix, fsuffix)