Skip to main content

Timeline for answer to How to open a file for both reading and writing? by Wizard

Current License: CC BY-SA 4.0

Post Revisions

12 events
when toggle format what by license comment
Mar 22, 2025 at 9:37 history edited leventov CC BY-SA 4.0
Add x and x+ modes
Jan 4, 2024 at 5:38 comment added shriek This reply is one of thiose instance where picture is worth thousand words. Great diagram/flowchart.
Oct 23, 2023 at 14:11 comment added IndustryUser1942 taken from stackoverflow.com/questions/1466000/… ?
Oct 12, 2023 at 14:39 comment added ArtOfWarfare How exactly does w+ work? The docs say that it truncates the file upon opening, so does that mean that if you use w+, you can't read what was originally in the file? If python were to crash while a file was open with w+, might I end up with two files - the original as well as a partially written new file that was meant to replace the original?
Sep 4, 2023 at 3:42 comment added AXO Cover means truncate. For the meaning of truncate refer to the documentation for io.IOBase.truncate() and os.truncate().
Aug 18, 2022 at 7:00 history edited BSMP CC BY-SA 4.0
Slight change to the text description of the image, removed "enter image description here", replaced image with white background so it's readable in dark mode.
Jan 20, 2022 at 7:23 history edited Flimm CC BY-SA 4.0
Format table using new table syntax! :)
Dec 1, 2021 at 12:17 comment added Rune S. H. @Flux You could use draw.io
Nov 26, 2021 at 11:31 comment added user3804598 What does "cover" mean here?
Apr 4, 2021 at 20:37 comment added blubberdiblub @ConorJamesThomasWarfordHen in this context "truncate" means "truncate the file to a length of 0". I.e. remove all previous contents of the file and start with an empty file at the time of opening.
Oct 18, 2020 at 22:33 comment added Conor James Thomas Warford Hen What does "truncate" mean here?
Nov 19, 2019 at 1:14 history answered Wizard CC BY-SA 4.0