Skip to main content

Shim around PyGame to hide "Hello" message on import.

Project description



There is a mature open-source library for building multimedia applications, like games, called PyGame.

Unfortunately, in an effort to recuit more developers, the maintainers added some output to the library around version 1.9.4, so it now prints text similar to this upon import:

pygame 1.9.6
Hello from the pygame community.

This move has been confusing (especially for user-facing command-line tools) and controversial but complaints about the behaviour have been dismissed.


This package provides a shim around PyGame that turns off the unwanted printing behaviour with an environment variable. It is designed to be a simple drop in replacement wherever you would use PyGame.

There are manual alternatives which have the benefit of reducing an external dependency, but this is simpler:

  1. Install both pygame and pygamesilent into your project.
  2. Replace any instances of these types of statements:
  • import pygameimport pygamesilent as pygame
  • import pygame as pgimport pygamesilent as pg
  • import xxx from pygameimport xxx from pygamesilent

Versions Supported

This is expected to be cross platform. It has been tested on Windows 10 and Linux.

It is tested on Python 2.7, 3.5, 3.6 and 3.7.


This has not been authorised by the PyGame team. The author is not associated with them.

You will still need to install and use PyGame, their documentation and follow their licenses.

You might even like to contribute to their project! Perhaps you can then politely convince them not to put spam in stdio?

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pygamesilent, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size pygamesilent-1.0.0-py2.py3-none-any.whl (3.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pygamesilent-1.0.0.tar.gz (7.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page