[Zope] Protecting Zope Code

Thomas B. Passin tpassin@mitretek.org
Fri, 5 Jul 2002 10:26:54 -0400


[Max M]
>
> >Can I protect my Zope code from being visible to users ? As far as I
> >know - once a user has access into the Zope development environment then
> >he can open the code of any ZPT or the third party products itself. Is
> >it possible to generate  compiled code in Zope ?
> >
> >
>
> If you have installed a Python product and it contains ie. a file called
> "myProduct.py" the first time zope is started a file called
> "myProduct.pyc" is created and placed next to the original file. This is
> a "compiled" Python file.
>
> You can then distribute the product containing only the *.pyc files.
>

Except that they may not work if moved to a different directory tree.  I
have seen, more than once,  a program fail because it was moved from the c:\
drive to the d:\ drive in Windows.  The .pyc files were moved too.  Deleting
them got it working.  I infer the the .pyc files contain information on key
paths.

Cheers,

Tom P