def __getitem__(self, cmd):

        if isinstance(cmd, LocalPath):
            return LocalCommand(cmd)
        elif not isinstance(cmd, RemotePath):
            if "/" in cmd or "\\" in cmd:
                # assume path
                return LocalCommand(local.path(cmd))
            else:
                # search for command
                return LocalCommand(self.which(cmd))
        else:
            raise TypeError("cmd must not be a RemotePath: %r" % (cmd,))
Returns a `Command` object representing the given program. ``cmd`` can be a string or
dataset/ETHPy150Open tomerfiliba/plumbum/plumbum/machines/local.py/LocalMachine.__getitem__