[PATCHv2] python: add get_lockspaces