What are the limitations of distributing .pyc files?

前端 未结 3 821
滥情空心
滥情空心 2020-12-01 18:13

I\'ve started working on a commercial application in Python, and I\'m weighing my options for how to distribute the application.

Aside from the obvious (distribute s

3条回答
  •  抹茶落季
    2020-12-01 18:51

    You certainly could distribute the .pyc files only. As Cat mentioned, no it would not be compatible with different major version of Python. It might prevent some people from viewing the source code, but the .pyc files are very easy to decompile. Basically if you can compile it, you can decompile it.

    You could use a binary packager like py2exe / py2app / freeze. I've never tried them but someone could still decompile them if they wanted to.

提交回复
热议问题