Re: Changing the path of the cataloged objects
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?
On Thu, Jan 16, 2003 at 11:18:44PM +0100, Igor Leturia wrote:
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)...
ZCatalog methods are in the API reference. http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixB.stx -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's NON-NATIVE SEXUALLY AMBIVALENT COW! (courtesy of isometric.spaceninja.com)
participants (2)
-
Igor Leturia -
Paul Winkler