我用python写了一个游戏使用的cfg模块。但是运行程序时出现错误。错误是“AttributeError: module 'cfg' has no attribute 'SCREENSIZE'”
不知道怎么解决这个问题
import os
import sys
import pygame
import cfg
from modules import *
'''main'''
def main():
pygame.init()
screen = pygame.display.set_mode(cfg.SCREENSIZE) #this row is problem
pygame.display.set_caption('Gemgem —— love')
pygame.mixer.init()
pygame.mixer.music.load(os.path.join(cfg.ROOTDIR, "resources/audios/bg.mp3"))
pygame.mixer.music.set_volume(0.6)
pygame.mixer.music.play(-1)