[python-win32] how do I copy a Python text string into the Windowsclipboard for use in another application?

Mark Hammond mhammond at skippinet.com.au
Fri Dec 5 00:21:18 EST 2003


Something like:

import win32clipboard, win32con
win32clipboard.OpenClipboard()
win32clipboard.SetClipboardData(win32con.CF_TEXT, "hello")
win32clipboard.CloseClipboard()

Mark.


-----Original Message-----
From: python-win32-bounces at python.org
[mailto:python-win32-bounces at python.org]On Behalf Of John Benson
Sent: Friday, 5 December 2003 3:26 PM
To: python-win32 at python.org
Subject: [python-win32] how do I copy a Python text string into the
Windowsclipboard for use in another application?


Hi, I just want to be able to move plain ASCII text out of a Python
application to the Windows clipboard. Any idea how I could accomplish that?

Thanks in advance for your help.




More information about the Python-win32 mailing list