Write on a file without erase what was before on it
Now that the SD card is available on the Wipy, I am searching the command to write on a file without erase what was on it before, someone can help me ?
robert-hh last edited by
Look for the files modes in open.
"w" will open it and eras the previous content
"a" will open it and append the new content to the end
"r+" will open it for reading and writing.
You may set the position to read or write with f.seek()
Thank you ! I will try that :)
livius last edited by
look here https://docs.python.org/3/tutorial/inputoutput.html