Op Tuesday 5 May 2015 11:20 CEST schreef Chris Angelico: > On Tue, May 5, 2015 at 6:52 PM, Cecil Westerhof <ce...@decebal.nl> wrote: >> I now defined get_message_slice: > > You're doing a lot of work involving flat-file storage of sequential > data. There are two possibilities: > > 1) Your files are small, so you shouldn't concern yourself with > details at all - just do whatever looks reasonable, nothing will > matter;
In my case the files are very small. Biggest is 150 lines. But if you publish your code, you never know in which situation it will be used. The suggestion implement a slice came from this newsgroup. ;-) And I found it a good idea. It is also to get reacquainted with Python. > or 2) Your files are bigger than that, performance might be > a problem (especially when your Big Oh starts looking bad), and you > should move to a database. > > Maybe even with small files, a database would be cleaner. You can > grab whichever rows you want based on their IDs, and the database > will do the work for you. Grab SQLite3 or PostgreSQL, give it a > whirl - you may find that it does everything you need, right out of > the box. Is a next step. I want to use PostgreSQL with SQLAlchemy. -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof -- https://mail.python.org/mailman/listinfo/python-list