The paste-as-brush and paste-as-pattern are scripts so if they can do it, Python can do it. Unfortunately, they both start with:
so you are out of luck. I am not too surprised by this, the Gimp scripts/plugins are purposely unable to interfere with the UI, and copy/pasting to the system clipboard would be such a case.
OTOH Gimp has its own screenshot function (Filer>Create>Screenshot), and my usual screenshot utility saves the image in /tmp and calls Gimp on it.
Code:
(let* ((pattern-image (car (gimp-edit-paste-as-new-image)))
so you are out of luck. I am not too surprised by this, the Gimp scripts/plugins are purposely unable to interfere with the UI, and copy/pasting to the system clipboard would be such a case.
OTOH Gimp has its own screenshot function (Filer>Create>Screenshot), and my usual screenshot utility saves the image in /tmp and calls Gimp on it.