Beispiel #1
0
 def to_io(fa: 'TmuxIO[A]', tmux: Tmux) -> Do:
     result = yield IO.delay(fa.run, tmux)
     yield IO.from_either(result.to_either)
Beispiel #2
0
def virtualenv_interpreter(venv: str, executable: str) -> Do:
    path_s = yield IO.from_either(env.get('PATH'))
    path = Lists.split(path_s, ':')
    clean_path = path.filter_not(lambda a: a.startswith(venv))
    candidate = yield IO.delay(shutil.which, executable, path=clean_path.mk_string(':'))
    return Path(candidate)