+ # Create a copy of clipboard pickled element
+ wx.TheClipboard.Open()
+ data = wx.CustomDataObject('XRCED')
+ if not wx.TheClipboard.IsSupported(data.GetFormat()):
+ wx.TheClipboard.Close()
+ wx.LogError('unsupported clipboard format')
+ return
+ wx.TheClipboard.GetData(data)
+ wx.TheClipboard.Close()
+ xml = cPickle.loads(data.GetData()) # xml representation of element
+ elem = minidom.parseString(xml).childNodes[0]