[pywin32-checkins] pywin32/com/win32com/demos dump_clipboard.py, 1.2, 1.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2010-10-22 23:48:47
|
Update of /cvsroot/pywin32/pywin32/com/win32com/demos In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10695 Modified Files: dump_clipboard.py Log Message: ignore errors fetching clipboard data Index: dump_clipboard.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/dump_clipboard.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dump_clipboard.py 27 Nov 2008 09:33:22 -0000 1.2 --- dump_clipboard.py 22 Oct 2010 23:48:38 -0000 1.3 *************** *** 30,34 **** print "Eeek - QGD indicated failure for tymed", t_this # now actually get it. ! medium = do.GetData(fetc_query) if medium.tymed==pythoncom.TYMED_GDI: data = "GDI handle %d" % medium.data --- 30,38 ---- print "Eeek - QGD indicated failure for tymed", t_this # now actually get it. ! try: ! medium = do.GetData(fetc_query) ! except pythoncom.com_error, exc: ! print "Failed to get the clipboard data:", exc ! continue if medium.tymed==pythoncom.TYMED_GDI: data = "GDI handle %d" % medium.data |