Sets the clipboard to a specific value. IMPORTANT NOTE - Your PySimpleGUI application needs to remain running until you've pasted your clipboard. This is a tkinter limitation. A workaround was found for Windows, but you still need to stay running for Linux systems. :param new_
(new_value)
| 20289 | # ...######..########.####.##........########...#######..##.....##.##.....##.########. |
| 20290 | |
| 20291 | def clipboard_set(new_value): |
| 20292 | """ |
| 20293 | Sets the clipboard to a specific value. |
| 20294 | IMPORTANT NOTE - Your PySimpleGUI application needs to remain running until you've pasted |
| 20295 | your clipboard. This is a tkinter limitation. A workaround was found for Windows, but you still |
| 20296 | need to stay running for Linux systems. |
| 20297 | |
| 20298 | :param new_value: value to set the clipboard to. Will be converted to a string |
| 20299 | :type new_value: (str | bytes) |
| 20300 | """ |
| 20301 | root = _get_hidden_master_root() |
| 20302 | root.clipboard_clear() |
| 20303 | root.clipboard_append(str(new_value)) |
| 20304 | root.update() |
| 20305 | |
| 20306 | |
| 20307 | def clipboard_get(): |
no test coverage detected