pyptlib, with experimental changes