I'm a school teacher who spent the summer writing a vocab training program in python that uses text available from wikipedia and gutenberg. Now all I have to do is figure out a way to filter out curse words so that I can distribute to students.
Normally I would just have an array (list) of those curse words and do a simple filter. The problem though is that the py file itself it openable by these students, seeing those words. If I put it in a separate file, somehow encrypted, then they could just delete that file and the output wouldn't be filtered.
Any ideas for workarounds?
If all the students are running the same version of Python (e.g. at a computer lab), you can distribute pyc files.  This is just obfuscation, but it will deter casual users.
How to "hide" curse words in a py file?