title: Python copy to clipboard the content of a variable
body: <p>I have a variable that stores text that the user types in a dialogue box. 
  I need to copy this text and then paste it in another field (to make a search)</p>
  
  <p>I tried pyperclip but it works only with plain text, not with variables. Here is the code just for the dialogue box and <strong>e</strong> is my variable.</p>
  
  <pre><code>from tkinter import *
  master = Tk()
  e = Entry(master)
  e.pack()
  
  e.focus_set()
  
  
  def callback():
      print(e.get())  # This is the text I want to use later
  
  
  b = Button(master, text="insert", width=10, command=callback)
  b.pack()
  
  
  mainloop()
  </code></pre>