While continuously accepting commands from the console with input, while drawing on the pygame window according to the command, it sounds simple, but there are too many problems
First pygame needs
while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() pygame.display.update()
On the other hand I need
while True: com = input('>') if 'add' in com: pygame.draw.circle(screen, (0, 0, 0), ( 250, 250), 3)
Adding the input directly to the while True loop outside pygame.display.update() will cause the pygame page to freeze, the multi-thread attempt fails, and the multi-process fails: EOF when reading a line
Would you like to write a picture for me?