Index: bambam-0.4.dfsg/bambam.py =================================================================== --- bambam-0.4.dfsg.orig/bambam.py 2013-05-13 12:03:52.000000000 +0200 +++ bambam-0.4.dfsg/bambam.py 2013-05-13 12:37:16.171299738 +0200 @@ -14,6 +14,7 @@ # along with this program. If not, see . import pygame, sys,os, random, string +import argparse from pygame.locals import * # figure out the install base to use with image and sound loading @@ -107,8 +108,13 @@ # Prints a letter at a random location def print_letter(key): global screenheight, screenwidth + global args font = pygame.font.Font(None, 256) - text = font.render(chr(key), 1, colors[random.randint(0, len(colors) -1)]) + if args.uppercase: + char = chr(key).upper() + else: + char = chr(key) + text = font.render(char, 1, colors[random.randint(0, len(colors) -1)]) textpos = text.get_rect() center = (textpos.width / 2, textpos.height / 2) w = random.randint(0+center[0], screenwidth-center[0]) @@ -119,6 +125,10 @@ # Main application # +parser = argparse.ArgumentParser(description='A keyboard mashing game for babies.') +parser.add_argument('-u', '--uppercase', action='store_true', help='Whether to show UPPER-CASE letters.') +args = parser.parse_args() + if not pygame.font: print 'Warning, fonts disabled' if not pygame.mixer: print 'Warning, sound disabled'