On Jun 28, 6:49 pm, defn noob <[EMAIL PROTECTED]> wrote: > On 28 Juni, 08:32, Carl Banks <[EMAIL PROTECTED]> wrote: > > > On Jun 27, 10:58 pm, defn noob <[EMAIL PROTECTED]> wrote: > > > > right. im an idiot anyway. i can just draw the lines before entering > > > the loop, problem solved... > > > Do not do that; it'll create a busy loop and use 100% of CPU. Use > > pygame.event.wait() instead. It waits for an event to occur, without > > using CPU cycles. > > > Carl Banks > > pygame.init() > screen = pygame.display.set_mode(size) > > while 1: > for event in pygame.event.get(): > if event.type == pygame.QUIT: sys.exit() > screen.fill(screencolor) > draw((500, 20), 5) > pygame.display.flip() > pygame.event.wait() > > running that i cant close the program... what must i do? create an > event at mouse click?
A. pygame.event.wait is used in lieu of pygame.event.get B. RTFM. I suggested pygame.event.wait with the expectation that you would refer to the pygame documentation to learn how to use it yourself. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list