[Zope] Python Scripts need to be recompiled ... again.

Ron Bickers rbickers-dated-997975031.4a0f05@logicetc.com
Thu, 9 Aug 2001 11:17:11 -0400


> -----Original Message-----
> From: Evan Simpson [mailto:evan@4-am.com]

> This happens whenever a Script finds itself in a Zope with a different
> version of Python or RestrictedPython than the one in which it was last
> compiled.  If you upgrade Python or Zope, or export/import a Script from
> one Zope to another (with a different version of one of these), the
> Script will complain that it can't use its cached compiled code.

Thank you for this explanation.  Now it doesn't feel so random.

> The effect of this is slight inefficiency; The Script compiles itself
> each time it is loaded into memory (usually once per Zope restart).

So everything works, just not as efficiently as it could.  Good.

> > 2) If there's no way to keep them compiled, is there a way to
> > programmatically check if they need to be compiled and then do so?
>
> I can probably make a utility script that does this.

That would be most helpful.  Especially if for every upgrade we would need
to recompile them all.

Thank you!
_______________________

Ron Bickers
Logic Etc, Inc.