Vous voulez passer pyperclip.paste()
au même endroit que vous placez une chaîne pour votre entrée ou insertions de widget de texte.
Jetez un coup d'œil à cet exemple de code.
Il y a un bouton pour copier ce qui se trouve dans le champ de saisie et un autre pour le coller dans le champ de saisie.
import tkinter as tk
from tkinter import ttk
import pyperclip
root = tk.Tk()
some_entry = tk.Entry(root)
some_entry.pack()
def update_btn():
global some_entry
pyperclip.copy(some_entry.get())
def update_btn_2():
global some_entry
# for the insert method the 2nd argument is always the string to be
# inserted to the Entry field.
some_entry.insert(tk.END, pyperclip.paste())
btn = ttk.Button(root, text="Copy to clipboard", command = update_btn)
btn.pack()
btn2 = ttk.Button(root, text="Paste current clipboard", command = update_btn_2)
btn2.pack()
root.mainloop()
Sinon, vous pouvez simplement faire Ctrl +V: D