import pygame WIDTH = 1000 HEIGHT = 1000 def draw_background_image(screen, filename): background = pygame.image.load(filename) screen.blit(background, (0, 0)) pygame.init() screen = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption("Тест Pygame") draw_background_image(screen, "assets/bg1k.png") pygame.display.flip() while pygame.event.wait().type != pygame.QUIT: ... pygame.quit()