pure python implementation of pyplasm (boolean operation not supported)