def is_program_installed(basename):
    for path in os.environ["PATH"].split(os.pathsep):
        abspath = osp.join(path, basename)
        if osp.isfile(abspath):
            return abspath


# =============================================================================
# Environment variables
# =============================================================================
Install a default InstanceState if none is present.
dataset/ETHPy150Open winpython/winpython/winpython/utils.py/is_program_installed--crossover with--dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/orm/instrumentation.py/ClassManager._new_state_if_none