-1

I'm making a very simple python code , it asks you some questions and then restarts your pc based on the answers i want to send it to some friends but i don't want them to read the code before they run it how can i encrypt the .py file so you can only run it but can't read or edit it ?

1 Answers1

1

You can run this command python -m py_compile fileA.py fileB.py fileC.py It will compile all 3 named files. Replace fileA.py, etc. with your python files. Afterwards you can run it with python just like usually.

Source: https://askubuntu.com/questions/324871/how-to-compile-a-python-file

Keyinator
  • 111
  • 2
  • 10