Working with fixed format text db's

Jeremy C B Nicoll jeremy at omba.demon.co.uk
Fri Jun 8 20:26:50 CEST 2007


Neil Cerutti <horpner at yahoo.com> wrote:

> Luckily, the output format has not changed yet, so issues with
> maintaining the above haven't arisen.

The problem surely is that when you want to change the format you have to do
so in all files (and what about the backups then?) and all programs
simultaneously.

Maintaining the code is the least of your the problems, I'd say.

You could change the data layout so that eg each field was terminated by a
marker character, then read/write delimited values.  But unless you also
review all the other parts of your programs, you need to be sure that you
don't have any other code anywhere that implicitly relies on a particular
field being a known fixed length.

> 
> However, I'd like something better.

What precisely do you want to achieve?


-- 
Jeremy C B Nicoll - my opinions are my own.



More information about the Python-list mailing list