Help

I've got this code, but it's only being run once, why:

while (1==1):
cursor_pos = pygame.mouse.get_pos()
cursor_pos_x = int(cursor_pos[0])
cursor_pos_y = int(cursor_pos[1])

The last three lines are tabbed

(log in to comment)

Comments

You aren't calling pygame.event.pump() (or .poll(), or .get(), or similar). The code is probably running just fine, but I think that if the event loop isn't being updated, then new input state won't propagate into things like mouse.get_pos() or key.get_pressed().
Thanks! It's working now!