|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
下载pygame安装好后
在idle中输入代码:
import sys
from pygame import *
from pygame.locals import *
后F5运行后显示:
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
>>>
感觉应该装好了但是输入代码:
import sys
from pygame import *
from pygame.locals import *
caption = pygame.display.set_caption('holle world')
运行就报错:
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "G:\python\例子\pygame(试试).py", line 4, in <module>
caption = pygame.display.set_caption('holle world')
NameError: name 'pygame' is not defined
>>>
请高手指教,谢谢!
|
|