T
Tim Rice
I have a need to write data to the Windows clipboard from a Python script.
I found a nice, simple solution @
http://wiki.wxpython.org/index.cgi/ClipBoard. The problem is, I can only
get it to work from within the PythonWin and SPE IDE's. I get errors if I
try to run the exact same code from the command line or via IDLE's
interactive shell. I can't figure it out. Any ideas? Possibly something
missing from my PYTHONPATH environment variable?
Any help is appreciated. Thanks,
Tim
From PythonWin (works fine):
From IDLE (doesn't work):
From Python (command-line) (doesn't work, more verbose errors):02:17:48: Error: Failed to put data on the clipboard (error -2147221008:
coIniti
alize has not been called.)
False02:17:56: Debug: ..\..\src\msw\clipbrd.cpp(554): 'OleSetClipboard(NULL)'
failed
with error 0x00000002 (the system cannot find the file specified.).
I found a nice, simple solution @
http://wiki.wxpython.org/index.cgi/ClipBoard. The problem is, I can only
get it to work from within the PythonWin and SPE IDE's. I get errors if I
try to run the exact same code from the command line or via IDLE's
interactive shell. I can't figure it out. Any ideas? Possibly something
missing from my PYTHONPATH environment variable?
Any help is appreciated. Thanks,
Tim
From PythonWin (works fine):
From IDLE (doesn't work):
From Python (command-line) (doesn't work, more verbose errors):02:17:48: Error: Failed to put data on the clipboard (error -2147221008:
coIniti
alize has not been called.)
False02:17:56: Debug: ..\..\src\msw\clipbrd.cpp(554): 'OleSetClipboard(NULL)'
failed
with error 0x00000002 (the system cannot find the file specified.).