[Zope] forcing all pythonscripts to recompile.

Peter Bengtsson mail@peterbe.com
Tue, 31 Jul 2001 12:02:28 +0200


> >>> "Norman Khine" wrote
> > you need to open the actual script and save it. i don't think there is a
> > simpler way, although, you may write a python script, which will open
the
> > files and then save it, but you are on your own here;^)
>
> Given that this is dozens of scripts, and that you can't even use 'Find'
to
> find them all (since 'Find' won't traverse into ZClasses) this is a pretty
> unpleasant task. It also means that the Last Changed date on all scripts
> will be reset to today - not good if you use the last changed at all when
> using the mgmt interface.

Today or tomorrow? Whenever!
You're going to need to click them with the mouse anyways so, go ahead and
write a script that saves us all mouse clicks :)

just:
--- mouseclicks_pys() ---
for object in context.objectValues():
     # is a folderish container object?
     if object.isPrinicpiaFolderish:
         # step inside
         object.mouseclicks_pys()
    elif object.meta_type="Script Python":
         object.manage_clickSaveButton()

someting like that