Convert map() to generator

This is for python 3 support.
Rephrase --regress and add --pa-base and --pa-weights

Since both of the --pa-* options start with the same word, they get -P
and -p options respectively.