def sh(self): if self._sh is None: self._sh = pexpect.which('sh') if self._sh is None: raise OSError('"sh" shell not found') return self._sh