On 2006-05-16, Peter Otten <[EMAIL PROTECTED]> wrote: >> Now how can I achieve, what I want? Really exchange one line with >> another, regardless of their length. Is this possible? If this is not >> possible, then what would be the best approach to do this? > > A file is exposed as a sequence of bytes. You can only exchange a string of > bytes with the same number of (different) bytes. Inserting or removing > bytes means you have to rewrite the file from the insertion/deletion point > onwards. Usually you don't bother and just rewrite the whole file.
Thanks to you both. I will use that. I do not think, that the files will be that large, that a database is useful. The main advantage of the file is, that it is directly human readible. Regards Marco -- http://mail.python.org/mailman/listinfo/python-list