我正在使用python 2.7 32位窗口和pygame 1.9.1
import pygame, sys
from pygame.locals import *
pygame.init()
DISPLAYSURF = pygame.display.set_mode((400, 300))
pygame.display.set_caption('Hello World!')
while True: # main game loop
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
错误信息是:
Traceback (most recent call last):
File "C:/Python27 32bit/Scripts/test.py", line 1, in <module>
import pygame
File "C:/Python27 32bit/Scripts\pygame.py", line 2, in <module>
ImportError: No module named locals