Unable to append to clipboard
Question: Whenever I try the following in my python interpreter. I am able to copy the
word hello to the command line, even after I close the interpreter

    
    
    from Tkinter import Tk
    r = Tk()
    r.clipboard_append(" hello ")
    

However if I put this in a file called test.py and then try

    
    
    python test.py
    

This will not work, I can't append this to the system clipboard

Does any one know why not or know what difference between running it in a
script and in the interpreter would cause


Answer: Apparently it won't work until Tkinter is in it's mainloop. This works on my
system:

    
    
    from Tkinter import *
    r = Tk()
    r.clipboard_append("hello")
    r.mainloop()
    

