How to make a string’s content appears on screen as we type on keyboard?

I have this function, where player can type his name, but I want each letter to appear on the screen as he types them. Here is my function : def input_player_name(): player_name_screen = True name = "" win.blit(player_name_bg, (0, 0)) while player_name_screen: for event in pygame.event.get(): if event.type == pygame.KEYDOWN: if event.key == pygame.K_RETURN: print(name) … Read more

PyEval_InitThreads in Python 3: How/when to call it? (the saga continues ad nauseam)

Basically there seems to be massive confusion/ambiguity over when exactly PyEval_InitThreads() is supposed to be called, and what accompanying API calls are needed. The official Python documentation is unfortunately very ambiguous. There are already many questions on stackoverflow regarding this topic, and indeed, I’ve personally already asked a question almost identical to this one, so I won’t be particularly surprised if this is closed as a duplicate; but consider that there seems to be no definitive answer to this question. (Sadly, I don’t have Guido Van Rossum on speed-dial.)