Okay, Iv spent hours hunting for something to help me and so far nothing has come even close! All the code seems to be either for Windows only, or it simply does not work under Ubuntu 7.10, which is what I'm using.
So, frustrated, Iv opted for a workaround:
I'm using wxGlade to design the interface of the program, so I simply dropped a text control onto the frame and made it invisible. This is called txtCopyBuffer, and I'm sure you can now see where I'm, going with this!
#first get the text
x = [The text I want to Copy]
#place this text into the hidden control
self.txtCopyBuffer.SetValue(x)
#select all
self.txtCopyBuffer.SetSelection(-1,-1)
#copy to the clipboard
self.txtCopyBuffer.Copy()
#clear it for next time
self.txtCopyBuffer.Clear()
My apologies to any purists out there, I know it doesn't look pretty, but it does the job, at least until someone, somewhere can tell me how to use the wxClipboard under Linux!
Regards
Max