Python Forum
What is meant by "truncates the file" RE file.open(w+b)?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is meant by "truncates the file" RE file.open(w+b)?
#2
There is no "insertion" mode. There's no way to put something in the middle of a file and have other things rearranged. So "r+" or "r+b" will allow you to seek within the file and overwrite portions.
Reply


Messages In This Thread
RE: What is meant by "truncates the file" RE file.open(w+b)? - by bowlofred - Sep-01-2020, 03:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Open/save file on Android frohr 0 375 Jan-24-2024, 06:28 PM
Last Post: frohr
  file open "file not found error" shanoger 8 1,297 Dec-14-2023, 08:03 AM
Last Post: shanoger
  Need to replace a string with a file (HTML file) tester_V 1 815 Aug-30-2023, 03:42 AM
Last Post: Larz60+
  How can i combine these two functions so i only open the file once? cubangt 4 926 Aug-14-2023, 05:04 PM
Last Post: snippsat
  How can I change the uuid name of a file to his original file? MaddoxMB 2 1,005 Jul-17-2023, 10:15 PM
Last Post: Pedroski55
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,163 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
  I cannot able open a file in python ? ted 5 3,587 Feb-11-2023, 02:38 AM
Last Post: ted
  testing an open file Skaperen 7 1,441 Dec-20-2022, 02:19 AM
Last Post: Skaperen
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,175 Dec-15-2022, 04:32 PM
Last Post: Larz60+
Photo Making Zip file of a file and Directory Nasir 2 1,073 Oct-07-2022, 02:01 PM
Last Post: Nasir

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020