trading_agent.terminal.clipboard_picture
¶
Saves a picture from the desktop clipboard, for Ctrl+V in the message box.
It asks wl-paste on Wayland, then xclip on X11 (which also serves Wayland through XWayland), for a PNG or JPEG on the clipboard. When neither has a picture, the message box pastes text as usual.
Typical usage example:
path = ClipboardPicture().save(folder)
ClipboardPicture
¶
Reads a picture from the clipboard.
save
¶
Writes the clipboard's picture to a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
folder
|
Path
|
Where to write it. |
required |
Returns:
| Type | Description |
|---|---|
Path | None
|
The picture's file, or None when the clipboard holds no picture or no clipboard program is installed. |