I am trying to figure out how to do file Input/output,
I have worked through lots of tutorials online,
and all the ones that mention file IO only mention the basic howto do it:
Code:
file_open = file("bla.txt")
file_open.write("\n\tbla")
file_open.close()
That would open a file (or you can use file_open = open("bla.txt", "w")
And to read one:
Code:
in_file = open("bla.txt","r")
text = in_file.read()
in_file.close()
But, what if i want to open a file and find a specific option, for example,
if i want to find a specific option in a configuration file, and then just alter its value?
Or if i want to open a file and save it with the time+date?
Does anyone have a good example of fileIO in python?
(sorry for the very lengthy post)
Chris.
Bookmarks