List of objects X Database

M.-A. Lemburg mal at
Thu Oct 4 11:10:26 CEST 2007

MindMaster32 wrote:
> I am writing a script that has to read data from an ASCII file of
> about 50 Mb and do a lot of searches and calculations with that data.
> That would be a classic problem solved by the use of a database
> (SQLite would suit just fine), but that would require the user to
> install more packages other than python itself, and that I am trying
> to avoid.
> Since the data is not too large, I wonder if there is another way to
> store all data in memory and work with it more or less like a
> database, doing searches and working with datafields.
> This is not clear to me how can be implemented. I thought of creating
> a class with the data structure, and creating a list of objects of
> that class, each one containing one line of data from the "database".
> Any thoughts or suggestions?

Python 2.5 ships with SQLite and also supports in-memory
storage of the data.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Oct 04 2007)
>>> Python/Zope Consulting and Support ...
>>> mxODBC.Zope.Database.Adapter ...   
>>> mxODBC, mxDateTime, mxTextTools ...

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! :::: Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the Python-list mailing list