Issue 20989: XML File I/O Misbehavior with open() when the flag is 'r+' (original) (raw)
Issue20989
Created on 2014-03-20 04:52 by rexperience7, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg214174 - (view) | Author: Rex Kim (rexperience7) | Date: 2014-03-20 04:52 |
I found a misbehavior when reading and writing XML File by open() with 'r+' flag, some strings will be overlapped at the end of the file. you can demonstrate it like below: f = open(file, "r+") c = f.read() # todo: write something to do f.write(c) f.close() Actually I'm not sure if it's bug or not however it might be. | ||
msg214216 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2014-03-20 12:53 |
Your example doesn't seem to have anything to do with XML, nor is it sufficient to reproduce the problem. Can you provide a simple program including sample data that reproduces the behavior you are concerned with? We'll also need to know what platform you are on. Is it possible you are missing a line end character at the end of your file? | ||
msg370466 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2020-05-31 14:33 |
Python 2.7 is no longer supported. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:00 | admin | set | github: 65188 |
2020-05-31 14:33:53 | serhiy.storchaka | set | status: open -> closednosy: + serhiy.storchakamessages: + resolution: out of datestage: resolved |
2014-03-20 12:53:56 | r.david.murray | set | nosy: + r.david.murraymessages: + |
2014-03-20 04:52:18 | rexperience7 | create |