I now know how to read and write to a file but need to understand how to save the file after I'm done..
with open('C:\\Users\\K\\Documents\\Python\\Protox\\Assets\\config.txt', 'r+') as configread:
line = configread.readlines()
line[0] = "light_mode = 0"
print(line[0])
with open('C:\\Users\\K\\Documents\\Python\\Protox\\Assets\\config.txt', 'r+') as configread:
line = configread.readlines()
print(line[0])
output is:
light_mode = 0
light_mode = 1
Meaning it will change it and then close it but when I re-open the file and try to read the line it will give me the previous line.