wxPython/wxGlade-0.9.1/clipboard.py
def paste(widget):
    """Copies a widget (and all its children) from the clipboard to the given
    destination (parent, sizer and position inside the sizer). Returns True on success."""
    error = None
    if not wx.TheClipboard.Open():
        misc.error_message( "Clipboard can't be opened." )
        return False

    try:
        data_object = None
        for fmt in [widget_data_format,sizer_data_format,window_data_format]:
            if wx.TheClipboard.IsSupported(fmt):
                data_object = wx.CustomDataObject(fmt)
                break
        if data_object is None:
            misc.info_message( "The clipboard doesn't contain wxGlade widget data." )
            return False
        if not wx.TheClipboard.GetData(data_object):
            misc.error_message( "Data can't be copied from clipboard." )
            return False
    finally:
        wx.TheClipboard.Close()
    format_name = data_object.GetFormat().GetId().split(".")[1]  # e.g. 'wxglade.widget' -> 'widget'
    compatible, message = widget.check_compatibility(None, format_name)
    if not compatible:
        wx.Bell()
        if message:
            misc.error_message(message)
        return False
    if not widget.clipboard_paste(data_object.GetData()):
        misc.error_message("Paste failed")
Copies a widget (and all its children) from the clipboard to the given
    destination (parent, sizer and position inside the sizer). Returns True on success.
Copies a widget (and all its children) from the clipboard to the given
destination (parent, sizer and position inside the sizer). Returns True on success.
Copies a widget ( and all its children ) from the clipboard to the given destination ( parent sizer and position inside the sizer ) . Returns True on success .
def paste(widget):
    error = None
    if not wx.TheClipboard.Open():
        misc.error_message( "Clipboard can't be opened." )
        return False
    try:
        data_object = None
        for fmt in [widget_data_format,sizer_data_format,window_data_format]:
            if wx.TheClipboard.IsSupported(fmt):
                data_object = wx.CustomDataObject(fmt)
                break
        if data_object is None:
            misc.info_message( "The clipboard doesn't contain wxGlade widget data." )
            return False
        if not wx.TheClipboard.GetData(data_object):
            misc.error_message( "Data can't be copied from clipboard." )
            return False
    finally:
        wx.TheClipboard.Close()
    format_name = data_object.GetFormat().GetId().split(".")[1]  
    compatible, message = widget.check_compatibility(None, format_name)
    if not compatible:
        wx.Bell()
        if message:
            misc.error_message(message)
        return False
    if not widget.clipboard_paste(data_object.GetData()):
        misc.error_message("Paste failed")
def paste ( widget ) : error = None if not wx . TheClipboard . Open ( ) : misc . error_message ( "Clipboard can't be opened." ) return False try : data_object = None for fmt in [ widget_data_format , sizer_data_format , window_data_format ] : if wx . TheClipboard . IsSupported ( fmt ) : data_object = wx . CustomDataObject ( fmt ) break if data_object is None : misc . info_message ( "The clipboard doesn't contain wxGlade widget data." ) return False if not wx . TheClipboard . GetData ( data_object ) : misc . error_message ( "Data can't be copied from clipboard." ) return False finally : wx . TheClipboard . Close ( ) format_name = data_object . GetFormat ( ) . GetId ( ) . split ( "." ) [ 1 ] compatible , message = widget . check_compatibility ( None , format_name ) if not compatible : wx . Bell ( ) if message : misc . error_message ( message ) return False if not widget . clipboard_paste ( data_object . GetData ( ) ) : misc . error_message ( "Paste failed" )
Copies a widget (and all its children) from the clipboard to the given
destination (parent, sizer and position inside the sizer).
Copies a widget ( and all its children ) from the clipboard to the given destination ( parent sizer and position inside the sizer ) .
"""Copies a widget (and all its children) from the clipboard to the given
    destination (parent, sizer and position inside the sizer). Returns True on success.""" # e.g. 'wxglade.widget' -> 'widget'
widget