Hi!
Um, new to the list. This question has probably been asked, and answered, before - but please, bear with me.
I am currently developing a small Python program to accomplish a simple task (I thought); To take text A from source X and transform it to format B, and place the result in destination Y. For instance, take simple HTML and transform it into simple LaTeX, or RTF, or some other format. This is all well and good, you say - what does this have to do with wxpython?
Well, you see, I got it into my head that it'd be pretty neat to be able to use the clipboard as source and destination. You copy the text you want translated, run the program, and paste wherever you want.
Since I was already using wx for the ui part of the program I thought I'd experiment a bit with the wx.clipboard component. The first part, getting stuff from the clipboard, worked just fine. Now, putting stuff in it... not so much.
It seems like I am able to put stuff in the clipboard - but when my program exists, the clipboard becomes empty. And I cannot for the life of me understand why.
I attach a simple testing program I found somewhere; I've tried it both in windows and in ubuntu. Writing, copying and pasting works well enough when the program is running - but if it is closed, particularly if it's closed before the contents of the clipboard have been pasted outside the program, I just get an empty clipboard.
Now to me, this seems strange. Any suggestions?
Thanks,
//Mikael "Krank" Bergström
testing-clipboard.py (1.32 KB)