How to hide the code of the script module?

Hello everyone,
I would like to ask how to hide the code of the script module. I am developing the script module recently, and I feel that it is a bit insecure to be able to directly see all the code. Hope to get everyone’s help. thanks!

best wishes,

You can search the internet for ways to hide your python code. You may be able to make it harder for people to see the code, but it won’t be possible to hide it completely.

Thanks Pieper.I will try this method. I learned that python code can be hidden by generating PYD files, and I also saw PYD files in Slicer’s generated project bin file, so when should I generate PYD files?Thanks again.

You’ll need to do some research on this. By default Slicer expects python scripts to be available in source form with any optimizations like compiling to byte codes being handled automatically by the python infrastructure.