Dear Lorenzo,
That lyp.py was a place holder module, and having place holders is not a good programming practice, as this lingering entry demonstrates.
There is a lyp export method csv2lyp in colormap.py.
Though, there is a revision of layer ids in progress that will affect this part.
This revision intends to make layers more robust in a variety of situations, like working on multiple foundries simultaneously and having multiple names and or colors for the same mask layer.
Ronald