pygame + py2exe = bad exe. why?

Erik Bethke erikbethke at
Sun Jan 16 10:55:36 EST 2005

M.E.Farmer wrote:
> Erik glad to see you were able to track it down.
> Have you been succesful in making the changes they mentioned?
> M.E.Farmer

Yes below is a simple script that works.  The key was that pygame uses
freesansbold.ttf as the default font and that is not copied over in the
normal py2exe process.  See the end of the setup script.

#!/usr/bin/env python
from distutils.core import setup
import py2exe, pygame
import glob, shutil

name='GoPets Mahjong',
description='Mahjong for GoPets Users',
author='Erik Bethke',
author_email='erik at',

shutil.copytree('data', 'dist/data')
shutil.copyfile('freesansbold.ttf', 'dist/freesansbold.ttf')

More information about the Python-list mailing list