Now it matches the name of my pinentry script.
FILE="${HOME}/.gnupg/agent-info"
GPG_TTY=$(tty)
-#gpg-agent --daemon --enable-ssh-support --write-env-file "${FILE}" --pinentry-program "${HOME}/bin/pinentry"
-gpg-agent --daemon --write-env-file "${FILE}" --pinentry-program "${HOME}/bin/pinentry"
+#gpg-agent --daemon --enable-ssh-support --write-env-file "${FILE}" --pinentry-program "${HOME}/bin/pinentry.py"
+gpg-agent --daemon --write-env-file "${FILE}" --pinentry-program "${HOME}/bin/pinentry.py"
echo "export GPG_AGENT_INFO; GPG_TTY='${GPG_TTY}'; export GPG_TTY" >> "${FILE}"
source "${FILE}"