-
-
Notifications
You must be signed in to change notification settings - Fork 207
Closed
Description
I'm not 100% what the support status is of pygame.scrap.get()
, specifically for reading text clipboard content.
Under Microsoft Windows 10, with Python 3.12.5 64-bit and pygame-c 2.5.2 the text support is returned from pygame.scrap.get_types() is:
'text/plain;charset=utf-8'
But when calling:
pygame.scrap.get('text/plain;charset=utf-8')
The result is utf-16-le, with a NUL terminator (i.e. 0x0000) and not utf-8 which .
Python 3.12.5 (tags/v3.12.5:ff3bc82, Aug 6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
pygame-ce 2.5.2 (SDL 2.30.8, Python 3.12.5)
>>> pygame.version
<module 'pygame.version' from 'C:\\code\\py\\PyDPainter\\py3venv\\Lib\\site-packages\\pygame\\version.py'>
>>> pygame.__version__
'2.5.2'
I'm not sure as I can see a number of older tickets:
- List of all deprecated features in pygame #2943
- Delete old unused scrap module code #1904
- Updated scrap code example. #2197
- Update example code that uses scrap #2084
- Delete old unused scrap module code #1904
- PATCH: pygame.scrap on X11, fix copying into PRIMARY selection (208) #223
- ImportError: No module named scrap on Windows 7 x64 (105) #120
When I look at the scrap.pyi and rst documentation that gets installed via pip it mentions 2.2.0 deprecations (same when looking at the C code) BUT I'm not seeing any warning messages when using those older API calls.
clipboard_text = pygame.scrap.get_text()
works great, so I'm up and running but not sure if I should have seen warnings at runtime.
Metadata
Metadata
Assignees
Labels
No labels