[Zope] Stupid Problem to append something to a file.. Arrgh!

andre borelan@wanadoo.fr
Mon, 28 Jul 2003 08:56:14 -0400


Hello,

I tried to append a string to a file :

somefile=open(path, 'a')
print >> somefile, "some string"

The string is appended twice to some file.

I get the same result with or without somefile.flush() or somefile.close().

When i try to open somefile in mode 'w+',
i read the file with readlines and then i
'writelines' it to the file after having appended a string to it.
What happens ? ho ho !!
the list is entirely written a number of times equal to the number of 
items in the list..

I can't say that the problem may be in Zope but when i try it from a 
Python shell, it works well, as expected.

Has everybody heard about something like that ?