Hi I have a problem. I would to generate a Python module that can explore the Zope objects hierarchy. I have created a ZClass like a DTMLDocument with some differences and so I need to replace a very large number of DTMLDocuments with instances of my ZClass, manteining the contents of the documents (body and properties). I want to do that by an automatic procedure using Python. I think is important to read and update the content of the file data.fs, but I don't know how I can do it. What is the format of the file ? Is there any python module for this problem ? Where can I find it ? Thanks Luca
Sorry but I can't understand why you do need to know the format of Data.fs. Why don't you do the follwoing. 1. Install another instance of Zope and replace its Data.fs with the copy of your current Data.fs 2. Write some Python Methods 3. Let them create your ZClasses from the original Folder tree('s DTMLDocuments). 4. See whether you get the desired result in live. 5. If it went wrong, Undo 3 in a click and debug your Python Methods and repeat 3-4. 6. If it went well, replace the resulting Data.fs with the origianl Data.fs If you insist, bbb.py(or fixbbb.py?) from utilities directory will output the conent of Data.fs in XML, IIRC. But, If you do in that way, you would 1. Get the Data.fs in XML format. 2. Write a module to extract the desired info from the XML file. 3. Write a medule and a method to .... .... It seems a lot complicated than the first way. IMHO. Anyway you might get more versed in Zope in the first way. ;-). oh-this-is-not-an-answer, sorry. LEE, Kwan Soo.
participants (2)
-
LEE, Kwan Soo -
Luca Ottone