(Oct-16-2017, 11:21 AM)gruntfutuk Wrote: Your first print does not work because your position in the file is already past the content you wrote.
You need atext_file.seek(0)
before the print.
Of course, wouldn't I have to print it after I write it? I can't print anything before I've written it because there would be nothing to print. Also it gave me an error when I tried to print it after closing the file...
text_file.seek(0)
wasn't used in any part of this and it still printed after the last write command so why would that be necessary? Please understand that I'm not trying to argue with those that I've asked for help from, but that makes no sense to me and I'm trying to understand. :D
(Oct-16-2017, 11:53 AM)buran Wrote: I don't see the point to post 26 lines of irrelevant code.
Also, if you closed the file, how do you expect to be able to read/write without opening it again. Same as to open a door, pass trough it, close the door behind you and then trying to pass trough it again, without opening it againĀ :-)
Both of the new print commands that I added in an attempt to print out the newly written lines before they were actually overwritten, were added after opening the file and before closing it again. If you look at the code again you should see that the same file is opened and closed 3 different times. So thank you for your reply but I don't think you understood my question.
Quote:If you can't learn to do something well?... Learn to enjoy doing it poorly.