Add files via upload

This commit is contained in:
themixray 2021-11-02 13:25:13 +03:00 committed by GitHub
parent e87b3c276a
commit 1170f1521c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 764 additions and 0 deletions

16
pygwin/_pg.py Normal file
View file

@ -0,0 +1,16 @@
from contextlib import contextmanager as _cm
import os as _os
import sys as _sys
@_cm
def _suppress_stdout():
with open(_os.devnull, "w") as devnull:
old_stdout = _sys.stdout
_sys.stdout = devnull
try:
yield
finally:
_sys.stdout = old_stdout
with _suppress_stdout():
import pygame as pg
pg.init()