Note that customcommands are run from service space (session 0) where we you cmd command is from user space (session 1). Hence there may be some differences.
HAving said that please post your profiles.conf file section which shows your custom commands. KEY point to note here is that you run your PY files from a CMD space, which is a Shell. Custom command launches your executable directly as an application (i.e. NO shell). So where as .py commands may run in cmd.exe (shell), .py is NOT an executable application by itself.
You may need to modify your custom command to launch a CMD.exe and then use the /C switch to invoke your py files. Or start the python runtime and then point to your PY file.
Again, post your config here and then it can be helped.
HAving said that please post your profiles.conf file section which shows your custom commands. KEY point to note here is that you run your PY files from a CMD space, which is a Shell. Custom command launches your executable directly as an application (i.e. NO shell). So where as .py commands may run in cmd.exe (shell), .py is NOT an executable application by itself.
You may need to modify your custom command to launch a CMD.exe and then use the /C switch to invoke your py files. Or start the python runtime and then point to your PY file.
Again, post your config here and then it can be helped.