3

Our python program on Windows needs to know when copying or pasting is complete. The time depends on the amount of data and the state of computer, etc. We want our program to sleep until copying or pasting is done, before it can proceed. Is there any way to test if the clipboard is currently busy (copying or pasting is done)?

Veet Vivarto
  • 371
  • 3
  • 11
  • related: http://stackoverflow.com/q/579687 – jfs Nov 11 '11 at 07:26
  • What do you mean by "complete"? I might copy something to the clipboard and paste it many hours later. Or I might never paste it. Or I might paste it dozens of times. At what point would you consider the copy and paste to be complete? – Adrian McCarthy Jan 06 '12 at 17:14

1 Answers1

0

The answer will differ depending on which toolkit you are using or targeting.

If it's pure win32, look up win32clipboard.setClipboardViewer in your "Python for Windows Documentation". There's a recipe in the ActiveState cookbook.

If it's Qt, the QClipboard class emits the dataChanged signal.

You might get a better answer if you tag the question with the actual toolkit being used (i.e. win32 , tkinter or whatever it is).

Giacomo Lacava
  • 1,784
  • 13
  • 25