The source code is not published for commercial or proprietary apps submitted to My Apps. You choose an application to be commercial by specifying a price, and proprietary by choosing a non-open-source license.
Regarding the Python question, my guess is that you're asking because Python app packages generally install the source files. You could distribute a bundle with the bytecode instead of the source files, but with the caveat that it can be decompiled. You could also try obfuscating the code, but while it seems that obfuscating Python code is not hard to do, also the efectiveness might be limited. You can learn more here, for example.
In any case, only users who have purchased your app will be able to access whatever it installs, but you should decide which type of license to use before submitting the app. You could even make it a commercial open source app!