Noob python question, sorry. But help if you can.

Hello,

I wish to create a game and then distribute it to a few friends.
However, I do not wish them to be able to change the python code for the game. Is there a way to compile the code in a form that is run time only.

Sorry if this is a noob question, and sorry if this has been asked before. Did a search but was unable to find the answer. :confused:

Thanks Dusty

there are several posibilities. i dunno but i think packpanda can at least pack your stuff together and make it distributeable. if you just want them to be unable to change the pycode easily you could send them the .pyc files which is compiled bytecode. not really un-changeable but hardly human-readable.
there might be more possibilities like putting the files into an encrypted archive or something.
i think this topic came up quite a few times: this could be of intrest for you
https://discourse.panda3d.org/viewtopic.php?t=3071&highlight=hide+code
https://discourse.panda3d.org/viewtopic.php?t=327&highlight=hide+code

Another topic that is relevant to this question:
discourse.panda3d.org/viewtopic.php?t=2120

It makes a .exe and it will make your distribution file smaller.