UserPreferences

WxPython/wxClipboard


I'm waiting for an answer on my question about wxClipboard/wx.Clipbboard:
Is there a way to get a list of supported data formats currently on 
wxClipboard?

I see from 
[http://www.wxwidgets.org/manuals/2.6.2/wx_wxclipboard.html#wxclipboardissupported 
wxClipboard] that for wxClipboard::IsSupported  "returns true if there 
is data which matches the data format of the given data object".  But is 
there anything akin to the Win32 EnumClipboardFormats, which returns an 
enumeration of all the available dataformats for the data on the 
clipboard?  Right now, with wxClipboard, I can't figure out a way to get 
all the supported formats without having to ask about each format I 
might know about.

My understanding of 
[http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/src/msw/clipbrd.cpp?rev=1.65&content-type=text/vnd.viewcvs-markup

wxWidgets/src/msw/clipbrd.cpp - view - 1.65] and 
http://www.wxwidgets.org/manuals/2.4.2/wx435.htm is that 
wxEnumClipboardFormats used to exist in version 2.4.2 of wxWindows but 
has since been deprecated in favor of the wxClipboard.

To be more concrete, I'd like to write cross-platform wxPython that does 
the equivalent to what I'm doing with win32clipboard (in the win32 
libraries of Python):

import win32clipboard

def getAvailableFormats():
    win32clipboard.OpenClipboard()
    print "There are %s formats available" % 
(str(win32clipboard.CountClipboardFormats()))
    val = win32clipboard.EnumClipboardFormats(0)
    while(val):
        try:
            format = win32clipboard.GetClipboardFormatName(val)
            print val, format
            s = win32clipboard.GetClipboardData (val)
          
        except:
            print val
            print win32clipboard.GetClipboardData (val)
        val = win32clipboard.EnumClipboardFormats(val)
    win32clipboard.CloseClipboard()


getAvailableFormats()
       


Thanks in advance,
-Raymond Yee