exopy.utils.widgets.qt_clipboard module

Implements a wrapper around the PyQt clipboard that handles Python objects using pickle.

This has been ported from Enthought TraitsUI.

class exopy.utils.widgets.qt_clipboard.PyMimeData(data=None, pickle=False)[source]

Bases: PyQt5.QtCore.QMimeData

The PyMimeData wraps a Python instance as MIME data.

  • data – Object to copy to the clipboard.

  • pickle – Whether or not to pickle the data.

MIME_TYPE = 'application/exopy-qt4-instance'
NOPICKLE_MIME_TYPE = 'application/exopy-qt4-instance'
classmethod coerce(md)[source]

Wrap a QMimeData or a python object to a PyMimeData.


Return the instance.


Return the type of the instance.


The list of local paths from url list, if any.

exopy.utils.widgets.qt_clipboard.CLIPBOARD = <exopy.utils.widgets.qt_clipboard._Clipboard object>

The singleton clipboard instance.