+ 3
What does "sys.stdout=codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')" do?
You can see more and more python codes wich are using Emojies. Using Emojis only works when you write "sys.stdout=codecs.getwriter('utf-8')(sys.stdout.buffer, 'strict')" at the top of your code. What does it exactly? (Dont answer it enables Emojies, please)
3 Réponses
+ 11
Depending on the language, the syntax might be different, but in general, it enables the UTF-16 (btw, 16 not 8) encoding as binding for the "standard output stream" (stdout).
In practice, this makes the given console render special characters, including emojis.
+ 2
and what is (sys.stdout.buffer, "strict")?
- 4
it enables emojis