本文介绍了为什么在导入 pygame 时,它会打印版本和欢迎消息.怎么删?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么我在导入pygame的时候会出现一条信息,它会打印版本和欢迎信息.消息读取
Why is there a message when I import pygame, it prints the version and welcome message. The message reads
"pygame 1.9.4 Hello from the pygame community.
https://www.pygame.org/contribute.html"
如何禁用此消息?
推荐答案
它对我有用:
import os
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide"
import pygame
这篇关于为什么在导入 pygame 时,它会打印版本和欢迎消息.怎么删?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!