def _fconfig_candidates_generator():
    """
    Configuration files candidates generator.

    See :py:func:~config_fname for more details.
    """

    yield os.path.join(os.getcwd(), "pystepsrc")

    try:
        pystepsrc = os.environ["PYSTEPSRC"]
    except KeyError:
        pass
    else:
        yield pystepsrc
        yield os.path.join(pystepsrc, "pystepsrc")

    if os.name == "nt":
        # Windows environment
        env_variable = "USERPROFILE"
        subdir = "pysteps"
    else:
        # UNIX like
        env_variable = "HOME"
        subdir = ".pysteps"

    try:
        pystepsrc = os.environ[env_variable]
    except KeyError:
        pass
    else:
        yield os.path.join(pystepsrc, subdir, "pystepsrc")

    module_file = _decode_filesystem_path(__file__)
    yield os.path.join(os.path.dirname(module_file), "pystepsrc")
    yield None
Configuration files candidates generator.

See :py:func:~config_fname for more details.
pysteps/__init__.py