-# GNU awk works fine, but it requires --re-interval to accept regexp
-# ranges, which we rely on to match blobs. We could expand the blob
-# on our own, but, yuck.
-if (${AWK-gawk} --re-interval --version) > /dev/null 2>&1; then
+if (${PYTHON-python} --version) > /dev/null 2>&1; then
+ # Python will exhibit exponential behavior processing some regular
+ # expressions, but we may have already fixed them all. (see
+ # http://swtch.com/~rsc/regexp/regexp1.html for details)
+ set_main_cmd=set_python_main
+elif (${AWK-gawk} --re-interval --version) > /dev/null 2>&1; then
+ # GNU awk works fine, but it requires --re-interval to accept regexp
+ # ranges, which we rely on to match blobs. We could expand the blob
+ # on our own, but, yuck.