# -*- coding: utf-8 -*-
# Se definen templates de los datos a leer
# Por ejemplo:
templates = { 'usuario': ('nombre', 'primerapellido',
'segundoapellido', 'dni', 'direccion', ), }
def settle_data(self, key, setter=lambda key, field:
xml_none(busqueda_xml(key, field))):
template = templates.get(key)
if template:
for field in template:
setattr(self, '%s_fichero' % field, setter(key, field))
# Saludos
_______________________________________________
Python-es mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/