how to export data from ZODB to text files

John J. Lee jjl at pobox.com
Tue Jun 7 19:32:01 EDT 2005


l.serwatka at gazeta-dot-pl.no-spam.invalid (ls) writes:

> Hi Peter,
> 
> Thank you for your reply. I already can access file using code
> 
> 
>       >>> from ZODB import FileStorage, DB
>       >>> storage =
> FileStorage.FileStorage('mydatabase.fs')
>       >>> db = DB(storage)
>       >>> connection = db.open()
>       >>> root = connection.root()
> 
> 
> But this is the point where my konwledge ends since I`m not a Python
> programmer. 
> 
> I don`t know what is the structure of ZODB, I`m just looking for code,
> or some tool, which I can use to export data from Data.ts file to
> plain text file. 
> 
> I`m looking for easiest way to export data from ZODB and put it to
> MySQL later. 
> 
> Do you know what way I should choose? I have to know Python language
> to finish this task?

Yes, you do (or hire somebody else who does).  I'm afraid you may
really have your work cut out here!  It really all depends on the
complexity of your application, and how well it was written.  But if
you're shiny-new to Python, Zope, OO databases and all the ideas that
go with these kinds of systems, you may be at the bottom of a longish
ladder -- what's your background?  ZODB is relatively simple and
probably has relatively few quirks as OO persistance systems go, but
still, learning ZODB and a new language at the same time might be
confusing (not to mention finding your way around the application
you're working with).  And Zope is... complicated.

Why are you doing this in the first place?  Trying to escape from
Zope-land?  Exporting data on a regular basis, for use in another app?


John



More information about the Python-list mailing list