foreach ($python in "py", "python3", "python", "python2") {
# NOTE: this only tests that the command exists in PATH, not that it's actually
# executable. The latter is not possible in a portable way, see
# https://github.com/PowerShell/PowerShell/issues/12625.
foreach ($python in "py", "python3", "python", "python2") {
# NOTE: this only tests that the command exists in PATH, not that it's actually
# executable. The latter is not possible in a portable way, see
# https://github.com/PowerShell/PowerShell/issues/12625.
if ($python -eq "py") {
# Use python3, not python2
$xpy_args = @("-3") + $xpy_args
if ($python -eq "py") {
# Use python3, not python2
$xpy_args = @("-3") + $xpy_args