Jan-14-2024, 10:46 PM
Windows 7
Python 3.8.10
I wish to read a binary file, and then write it's data to a different file, skipping the first 16 bytes.
How do I do that?
Python pseudo code:
Python 3.8.10
I wish to read a binary file, and then write it's data to a different file, skipping the first 16 bytes.
How do I do that?
Python pseudo code:
1 2 3 4 5 6 7 |
oldfile = open ( "oldfile.dat" , mode = "rb" ) #Open old file for binary read newfile = open ( "newfile.dat" , mode = "wb" ) #Open new file for binary write olddata = oldfile.read() #Read the original file #How do I write olddata, after the first 16 bytes, into newfile.dat? # newfile.write( From olddata[16] ?? ) |