python: use six to support Python2 and 3