asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.47k stars 1.27k forks source link

pyautogui.typewrite replaces '<' with '>' #856

Closed RedHeadphone closed 4 months ago

RedHeadphone commented 6 months ago

Code:

import pyautogui
import time

time.sleep(5)
pyautogui.typewrite(">><<")

Output: >>>>

System specification: Python 3.12.2 PyAutoGUI 0.9.54

darkb0ts commented 6 months ago

because python 3.12 change so many thing change in ctype . pyautogui support python 3.11.x .

RedHeadphone commented 6 months ago

tried on Python 3.10, same issue. Is there any workaround?

darkb0ts commented 6 months ago

please ensure your python version 3.11.x . my python version is python 3.11.9 `import pyautogui import time

time.sleep(5) pyautogui.typewrite(">><<")` and Poc

https://github.com/asweigart/pyautogui/assets/113747108/a08ffd40-9458-43a9-a75d-30f0dc0ee861