My code, besides beeing cumbersome and criptic, has another quality: it is buggy! I apologize for that; obviously I discovered it after posting (in the best tradition of Murphy's law!). When I will find the solution I let you know, also if the problem is made difficult for the fact that the for cycle is indexed in terms of a 5 element tuple, not very easy (at least for me!...). -- http://mail.python.org/mailman/listinfo/python-list