0

Currently, the codes are compiled to .pyd files using Cython so I guess they are protected from people who want to see the source code.

However, the problem is that we would like them (the cythonized code) to be unusable without appropriate license files just like any commercial software.

Is there a way for a source code to check for available license files before proceeding to the actual execution? or perhaps any other way to check the user's PC information before allowing execution?

Cody Chung
  • 629
  • 1
  • 6
  • 15
  • Possible duplicate of [How do I protect Python code?](https://stackoverflow.com/questions/261638/how-do-i-protect-python-code) – Kamil Niski Nov 07 '19 at 02:05

1 Answers1

0

I don't know what sort of license you are using, but if it's in something saved in a text file, you can add an if statement to you code that checks where or not the file exists. Additionally you could add hashing to compare a digest of the official license to the file save on the user's computer.

Python does not have the facilities built-in to enforce copy protection.

9716278
  • 2,044
  • 2
  • 14
  • 30