Falldog / pyconcrete

Protect your python script, encrypt it as .pye and decrypt when import it
Apache License 2.0
702 stars 150 forks source link

Python version doesn't match with magic #29

Closed lean0708 closed 6 years ago

lean0708 commented 6 years ago

Is this error related to a python version mismatch? (i mean, compiled with a version 2.7.x and deployed with version 2.7.n)

Falldog commented 6 years ago

Yes, because of .pye compress from .pyc, this is .pyc limitation

federicoemartinez commented 6 years ago

Would it make sense to compress from .py instead of pyc? We would like to use pyconcrete in production and it would be great if we can support multiple python versiones, because it can be tricky to manage the python version installed in servers that are not ours.

Falldog commented 6 years ago

@federicoemartinez it's recommended to use .pyc to encrypt .pye for security reason. It's not safe about encrypt .py to .pye, because pyconcrete will decrypt it at runtime then execute it. I think that encrypt .pyc to .pye will be more security than .py

federicoemartinez commented 6 years ago

I got it, thanks!