I have the following problem: I program questions / answers for XO games (OLPC) in python using pygame, pygtk and pgu. When a user (child) writes something, textarea (from pgu) does not accept special characters, such as: ,,, etc. I tried a smaller program only with pygame and pgu, and it works well. I think the problem may be in unicode in pygtk, but I donβt know how to check or fix it.
app = gui.App()#gui is from pgu c = gui.Container(width =1200,height = 900) background = pygame.display.get_surface() app.init(c,background) #load initial screen while self.running and salir==1: background.blit(self.pantalla,(0,0)) x,y = pygame.mouse.get_pos() for event in pygame.event.get(): if event.type == pygame.QUIT: self.running = False return if event.type == pygame.KEYDOWN: if event.unicode.isalnum(): print event.unicode print "Evento pygame:",event.key if event.key == pygame.K_DOWN: exit() app.event(event) app.paint(background) app.update(background) pygame.display.flip() #now I have to manage pygtk events: p = gtk.events_pending() while p: gtk.main_iteration()
When I press Γ±, I get to the log file: key ntilde unrecognized.
Please help, I am stuck and I have to deliver the software.
source share