On Jul 23, 9:05 am, MRAB <pyt...@mrabarnett.plus.com> wrote: > LeeRisq wrote: > > Hi all, > > > Newbie question. I've written a script that outputs to a text file. > > > Now, I just want to copy the content to win32clipboard for access to > > other applications. Here's the mess I've come up with so far:) > > [snip] > > def copy_text(): > ifile = open(r"C:\Query\DQL.txt", "r") > text = ifile.read() > ifile.close() > > win32clipboard.OpenClipboard() > win32clipboard.EmptyClipboard() > win32clipboard.SetClipboardText(text) > win32clipboard.CloseClipboard()
I've actually tried this configuration, but I did it again just to be sure. The program executes without exception, but the text still isn't copied to the clipboard. Any ideas? -- http://mail.python.org/mailman/listinfo/python-list