(root)
Make paste replace selection on x11.  See issue #5124.
Make paste replace selection on x11.  See issue #5124.
Make paste replace selection on x11 . See issue #5124 .
def fix_x11_paste(root):
    "Make paste replace selection on x11.  See issue #5124."
    if root._windowingsystem == 'x11':
        for cls in 'Text', 'Entry', 'Spinbox':
            root.bind_class(
                cls,
                '<<Paste>>',
                'catch {%W delete sel.first sel.last}\n' +
                        root.bind_class(cls, '<<Paste>>'))
def fix_x11_paste ( root ) : if root . _windowingsystem == 'x11' : for cls in 'Text' , 'Entry' , 'Spinbox' : root . bind_class ( cls , '<<Paste>>' , 'catch {%W delete sel.first sel.last}\n' + root . bind_class ( cls , '<<Paste>>' ) )