import pygame.display __all__ = ['screen_size'] # get screen resolution pygame.display.init() info = pygame.display.Info() screen_size = info.current_w, info.current_h pygame.display.quit()