Yeah, maybe __main__ is good. Perhaps pygame.tests should have a __main__ function too?
>>> import pygame.tests
>>> pygame.tests.main()
Since main() is what is used in the examples, it would be nice to try and keep it the same. But then we need to add a main.py and a __main__.py... ew.
"""
You can do a self test with:
python -m pygame.tests
Or with python2.6 do:
python -m pygame.tests.__main__
"""
Doing it for examples could list which examples are available?
$ python -m pygame.examples
aacircle
aliens
arraydemo
blend_fill
blit_blends
camera
chimp
cursors
eventlist
fastevents
fonty
glcube
headless_no_windows_needed
liquid
mask
midi
moveit
movieplayer
oldalien
overlay
pixelarray
scaletest
scrap_clipboard
scroll
sound
sound_array_demos
stars
testsprite
vgrade
eg.
"""
See a list of
examples...
python -m pygame.examples
Or with python2.6,
python -m pygame.examples.__main__
Run one of the 30 examples included...
python -m pygame.examples.aliens
"""
I'm not sure anyone would remember to add __main__ at the end(or even main). oh well.
There might be a workaround... One work around might be to make it into a module-module, not a package-module. Then have the module-module load the package-module into its namespace.