On 14 avr, 06:14, "Jia Lu" <[EMAIL PROTECTED]> wrote: > Hello all > > I donot want to use a real DB like MySQL ... But I need something to > save about more than 1000 articles. > Is there any good ways? >
Hi, For small sets of data PyDbLite is a good alternative to full-blown db engines >>> import PyDbLite >>> db = PyDbLite.Base("records").create('title','artist') >>> db.insert('Ok Computer','Radiohead') 0 >>> db.insert('Night On Earth','Rialto') 1 >>> db.insert('Employment','Kaiser Chiefs') 2 >>> print [ r['title'] for r in db ] ['Ok Computer', 'Night On Earth', 'Employment'] >>> print [ r['artist'] for r in db if r['artist'].startswith('R') ] ['Radiohead', 'Rialto'] >>> The syntax is intuitive for Python programmers (list comprehensions) ; it's a single, small Python module downloable at http://quentel.pierre.free.fr/PyDbLite/index.html Regards, Pierre -- http://mail.python.org/mailman/listinfo/python-list