def get_cmdshell(self): if not self._cmdshell: import cmdshell self.get_ssh_key_file() self._cmdshell = cmdshell.start(self) return self._cmdshell