In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to solve the problem that the PyKeyboard plug-in in Python3.6 can not enter Chinese characters. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Today, when writing keyword search and collection based on Wechat PC, we can input letters and numbers into the search box through PyKeyboard's type_string method, but Chinese characters can not be entered all the time. It was later discovered that PyKeyboard had a flaw in Python3.6. The solution is as follows:
Step 1: install the plug-in: pip install pyperclip step 2: use the plug-in's copy () method to copy Chinese characters to the clipboard: pyperclip.copy ("Chinese") step 3: use the mouse in the input state Step 4: simulate keyboard click ctrl+v the complete code is as follows: import pyperclip import timefrom pykeyboard import PyKeyboardpyperclip.copy ("Chinese") time.sleep (2) # pyperclip.paste () k = PyKeyboard () # Simulation keyboard click ctrl+v to achieve string copy function k.press_key (k.control_key) k.tap_key ('v') k.release_key (k.control_key) # at this time Chinese characters have been copied to the input box ^ _ ^ the above content is how to solve the problem that the PyKeyboard plug-in in Python3.6 can not input Chinese characters, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.