|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
我这个为什么会报错呢
- >>> import pygame
- pygame 1.9.6
- Hello from the pygame community. https://www.pygame.org/contribute.html
- >>> pygame.display.list_modes
- <built-in function list_modes>
- >>> pygame.display.list_modes()
- Traceback (most recent call last):
- File "<pyshell#2>", line 1, in <module>
- pygame.display.list_modes()
- pygame.error: video system not initialized
- >>>
复制代码
你要先 pygame.init() 才可以获取
- >>> import pygame
- pygame 1.9.6
- Hello from the pygame community. https://www.pygame.org/contribute.html
- >>> pygame.init()
- (6, 0)
- >>> pygame.display.list_modes()
- [(1920, 1080), (1680, 1050), (1600, 900), (1440, 900), (1400, 1050), (1366, 768), (1360, 768), (1280, 1024), (1280, 960), (1280, 800), (1280, 768), (1280, 720), (1280, 600), (1152, 864), (1024, 768), (800, 600), (640, 480), (640, 400), (512, 384), (400, 300), (320, 240), (320, 200)]
复制代码
|
|