Python rewrite of LightDM's dm-tool