Let users execute but not view

John Roth newsgroups at jhrothjr.com
Sun Jan 4 17:53:33 EST 2004


"Florian Lindner" <Florian.Lindner at xgm.de> wrote in message
news:bt9o11$7rq$05$1 at news.t-online.com...
> Hi!
> I have a python script which should be executed my normal users but they
> should not be able to view the sourcecode. Setting permissions to x only
> does not help, the python interpreter can not read the file.
> How can I do that?
> Thanks,
> Florian

You've already got the standard answers, hopefully that will do
what you need to do.

The other way is to dig into the import mechanics, paying
particular attention to how it unfreezes frozen modules,
and then arrange to decrypt your encrypted pre-compiled
modules when they have to be imported.

That's a *lot* of hassle, and I don't know of anyone
who's actually done it. Whether the work is worth
the benefit is, of course, your decision.

John Roth





More information about the Python-list mailing list