hello ! why keil can't execute python script on before build/rebuild user command , he can only execute batch file
What error are you getting when you try to execute
py "filename"
in Before Build/Rebuild?