[Zope] Re: Changing the path of the cataloged objects

Igor Leturia IGOR@emun.com
Thu, 16 Jan 2003 23:18:44 +0100


OK. But what would be the exact python code to do the following:
 - for each of the cataloged objects
    + see if the path contains a certain string
    + replace the string for another one
I'm new to Python and I don't know how to do it or what methods or
properties the ZCatalog object has (and I don't know how can I obtain
that information)...
Thanks in advance,
     Igor Leturia

Dieter Maurer wrote on 16/01/2003 22:01:zCatalog._catalog maintains the
maps "uids <--> paths" in the
mappings "uids" and "paths".
You can update them, if necessary.

Igor Leturia wrote at 2003-1-16 08:46 +0100:
 >   I have some objects external to the ZODB that I have cataloged in a
 > ZCatalog. The objects have been moved to another directory, so I need
to
 > change the path of the cataloged objects. For various reasons (not
the
 > weakest of them being the long time needed to catalog all these
objects)
 > I would like to do this without having to recatalog all. What would
be
 > the python code to achieve this?