Archive for September, 2010

lemon.py

I told people at work (yes, I have a job now, more about that later… or maybe not) that I could make lemon pie. They know I’m all about free software, so they asked me if it was GPL lemon pie. I published this in our intranet (some of it is in Spanish, but even if you don’t speak a word of Spanish you can tell what’s going on):

#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''How to make a yummy lemmon pie'''

###
#
# lemon.py is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# lemon.py is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see 
# or write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA  02111-1307  U.S.A.
#
###

INGREDIENTES_MASA = {'harina':'250g', 'azúcar':'125g', 'manteca':'75g', \
'huevos':1, 'yema':1, 'esencia de vainilla':'un chorro'}
MASA = []

for ingrediente in INGREDIENTES_MASA:
    MASA.append(ingrediente) # la masa queda húmeda.
    #cook(MASA, '20 minutos', 'horno medio')


INGREDIENTES_RELLENO = {'agua':'1 taza', 'maizena':'¼ taza', \
'jugo de limón':'½ taza', 'ralladura de limón':'de 1 limón', 'yemas':3, \
'manteca':'50g'}

RELLENO = []
RELLENO_DESPUES = []

for ingrediente in INGREDIENTES_RELLENO:
    if ingrediente != 'yemas' and ingrediente != 'manteca':
        RELLENO.append(ingrediente)
    else:
        RELLENO_DESPUES.append(ingrediente)
    #estado_relleno = cook(RELLENO, 'hasta que se espese y hierva', \
    #'fuego lento') # hay que revolver constantemente
    #if estado_relleno == 'cooked':
    #    for ingrediente in RELLENO_DESPUES:
    #        RELLENO.append(ingrediente) # continuar revolviendo 2 minutos más


INGREDIENTES_MERENGUE = {'claras':4, 'azúcar':'8 cucharadas'}
MERENGUE = []

for ingrediente in INGREDIENTES_MERENGUE:
    MERENGUE.append(ingrediente)
    #whisk(MERENGUE) # hasta que se formen piquitos

LEMON_PIE = MASA + RELLENO + MERENGUE
#cook(LEMON_PIE, 'hasta que se dore el merengue')

Comments (5)