def remove ( self , path ) : p = self . cmd ( 'shell' , 'rm' , path ) stdout , stderr = p . communicate ( ) if stdout or stderr : return False else : return True
paramiko python + remove remote file
Remove remote file Return : bool : true or false
def remove(self, path):
        """Remove remote file
        Return:
            bool: true or false"""
        p = self.cmd('shell', 'rm', path)
        stdout, stderr = p.communicate()
        if stdout or stderr:
            return False
        else:
            return True