osx - Mac OS X pygame input goes to Terminal instead of Python -


i'm having trouble running pygame based app on mac os x via terminal. input events such keystrokes go terminal instead of python app, , detected pygame.

for example, have following test script:

import pygame  pygame.init() screen = pygame.display.set_mode((640, 480))  done = false while not done:     pygame.event.pump()     keys = pygame.key.get_pressed()     if keys[pygame.k_escape]:         done = true     if keys[pygame.k_space]:         print "got here" 

neither k_escape nor k_space handled script when run mac os x terminal, terminal echo spaces.

i'm running macports port of pygame (py-game), depends on python 2.4, , i've used python_select make python24 active version.

the default py-game on mac ports has problem describe. work-around install py-game2.6 target instead. works me os x 10.6.7.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -