首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何解决keyboardInterrupt?

如何解决keyboardInterrupt?

提问于 2020-10-10 22:34:13
回答 0关注 0查看 1K

import sys

import pygame

def run_game():

pygame.init()

screen = pygame.display.set_mode((1200,800))

pygame.display.set_caption('Alien Invasion')

while True:

for event in pygame.event.get():

if event.type == pygame.QUIT:

sys.exit()

pygame.display.flip()

run_game()

Traceback(most recent last call):

File "G:\python\python_work\alien_invasion.py", in line 14 <module> run_game()

File "G:\python\python_work\alien_invasion.py", in line 11 run_game pygame.display.flip()

keyboardInterrupt

求解!!!

我在网上四处搜寻没有得到解决的方案,请求各位大佬能提供支持!

这里谢谢了

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档