There are already at least 2 packages that copy/paste to/from the clipboard. A simple search will find them.
Quote:Unfortunately I am not able to save the Pixbuf "image" as a png or jpeg file e.g. when clicking "Paste"Why not? Save it in some other format and use Python's bindings to Imagemagick to convert to one of the formats you want.