[pyar] hola!

Felipe Madero felipe.madero en gmail.com
Vie Ago 8 18:03:59 ART 2014


import pygame
import turtle
import numpy

pygame.init()
font = pygame.font.SysFont(None, 48)
surf = font.render('Hola Mundo PyAr :D', False, (0,0,0), (255,255,255))
cols, rows = surf.get_size()
arr = pygame.surfarray.array2d(surf)
turtle.shape("turtle")
for (x, y), val in numpy.ndenumerate(arr):
    if val:
        turtle.penup()
        turtle.goto(x - cols/2, -y + rows/2)
        turtle.pendown()
        turtle.forward(1)
turtle.hideturtle()
turtle.mainloop()
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20140808/d8c7b948/attachment.html>


More information about the pyar mailing list