Cześć próbowałem wielu kodów, wielu sposobów, wiele przeczytanych forów. Okno się po prostu nie zamyka.
Pisze w Pycharm, próby w IDLE oraz terminalu wychodzą podobnie. Poniżej podaje kod może ktoś znajdzie błąd.
A tam pisze w phythonie wersji 2.7
import pygame import sys #exit from livewires import games from pygame.locals import * #pygame.init() #New screen window width = 640 height = 480 screen = pygame.display.set_mode((width, height)) # screen.mainloop(fps = 50) # This should show a blank 200 by 200 window centered on the screen pygame.display.flip() running = True clock = pygame.time.Clock() while True: clock.tick(60) # Maximum fps never over 60 (speed limits) x,y = pygame.mouse.get_pos() for event in pygame.event.get(): if event.type == pygame.QUIT: # if we get smt sys.exit(0) elif event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: pygame.quit() sys.exit(0) screen.fill((0, 0, 0)) # screen color RGB pygame.display.update()
PS. używam pythona v. 2.7