(self)
Delete the X clipboard
Delete the X clipboard
Delete the X clipboard
def del_clipboard(self):
        '''Delete the X clipboard'''

        try:
            cb_p = Popen(['xsel', '-l', '/dev/null'], stdout=PIPE)
            cb = cb_p.stdout.read().decode()
            if cb == self.cb:
                if platform != 'darwin':
                    Popen(['xsel', '-pc', '-l', '/dev/null'])
                    Popen(['xsel', '-bc', '-l', '/dev/null'])
                else:
                    Popen(['pbcopy', '-pboard', 'general'], stdin=PIPE,
                        stderr=PIPE, stdout=PIPE).communicate(b'')
                self.cb = None
        except FileNotFoundError:  # xsel not installed
            pass
def del_clipboard ( self ) : try : cb_p = Popen ( [ 'xsel' , '-l' , '/dev/null' ] , stdout = PIPE ) cb = cb_p . stdout . read ( ) . decode ( ) if cb == self . cb : if platform != 'darwin' : Popen ( [ 'xsel' , '-pc' , '-l' , '/dev/null' ] ) Popen ( [ 'xsel' , '-bc' , '-l' , '/dev/null' ] ) else : Popen ( [ 'pbcopy' , '-pboard' , 'general' ] , stdin = PIPE , stderr = PIPE , stdout = PIPE ) . communicate ( b'' ) self . cb = None except FileNotFoundError : # xsel not installed pass