commandlib
commandlib copied to clipboard
Command runner with clean API.
* https://docs.python.org/3/glossary.html#term-eafp * https://blogs.msdn.microsoft.com/pythonengineering/2016/06/29/idiomatic-python-eafp-versus-lbyl/ https://github.com/crdoconnor/commandlib/blob/b630364fd7b0d189b388e22a7f43235d182e12e4/commandlib/command.py#L78-L80 ```python try: new_path = ':'.join(self._paths + [env_vars['PATH']]) except KeyError: new_path = self._paths ``` --- https://github.com/crdoconnor/commandlib/blob/b630364fd7b0d189b388e22a7f43235d182e12e4/commandlib/command_path.py#L45-L48 ```python try: return commands[name] except KeyError: raise CommandError("'{0}' not found...