[pyar] Hola Mundo !

Nehuen Diez nehuen.diez en gmail.com
Jue Ene 27 12:34:14 ART 2011


Ya que estamos aprovecho para mi presentación oficial que nunca la hize...
(Creo)

import pygame
from pygame.locals import *
from sys import exit

pygame.init()

SCR_SIZE = (200, 200)

screen = pygame.display.set_mode(SCR_SIZE, 0, 32)

pygame.display.set_caption('Hola Mundo!')

font = pygame.font.SysFont('comic sans', 22, bold=True)

font_height = font.get_linesize()

while True:
    for event in pygame.event.get():
        screen.fill((0, 0, 0))
        y = SCR_SIZE[1]/2
        x = SCR_SIZE[0]/2-50
        if event.type == QUIT:
            exit()
        elif event.type == KEYDOWN:
            if event.key == K_h:
                screen.blit(font.render('Hola mundo!', False, (0, 255, 0)),
(x, y))

    pygame.display.update()



:P

Todavia estoy aprendiendo...



Saludos Cordiales.
                            -Nehuen Diez-
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20110127/4674aa92/attachment.html>


More information about the pyar mailing list