G+_Rud Dog Posted December 3, 2015 Share Posted December 3, 2015 Notepad file 17MBs in size hangs when opening only way out is to close Notepad. But if you are patient it will eventually open or at least did once for me. What I noted; the file is one continuous line in other words no linefeeds. Closed the file and opened it with OpenOffice text file mode. It opened in good time and reformatted data displaying with newlines. Closed the file and tried opening with Notepad and it opened fine. Shut down the computer and next day opened the same file using Notepad or I should say tried to open it. It was back to the same problem, would not open. The real big problem is when my Python 3.4 script on windows 8 interacts with this file it hangs my script with no error reported so can't code around it. Any ideas what this is all about? Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted December 3, 2015 Share Posted December 3, 2015 The end of line character is probably a line feed only, which Notepad doesn't recognize as a line break. Try Notepad++ instead. What's the purpose of the file? Coma or Tab delimited data? Normal text files don't usually grow to be 17MB. Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 3, 2015 Author Share Posted December 3, 2015 The data looks to be listing of dll's and other listings. The sad part is if this file occurs on a system where my script is run the user will have no recourse other then to force my "search by keyword script" to shutdown. Link to comment Share on other sites More sharing options...
G+_Phil Chung Posted December 3, 2015 Share Posted December 3, 2015 I agree, try Notepad++, though I have been using Visual Studio Code a lot lately. Link to comment Share on other sites More sharing options...
G+_610GARAGE Posted December 3, 2015 Share Posted December 3, 2015 I ++ notepad++. :) Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 3, 2015 Author Share Posted December 3, 2015 Guess the most annoying thing is no error reported by my Python3 script running on Windows 8 Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted December 4, 2015 Share Posted December 4, 2015 Python is probably just ingesting the file. Do you know what the file is used for? Maybe a log of some sort? Is the file being used by Python or is it from another application? If it's not needed, try renaming it with a different file extension and see if anything breaks? Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 4, 2015 Author Share Posted December 4, 2015 In the case of this file extension my script is looking for all files ending in "txt" once found it searches the file for keyword. This kind of makes it imperative the file be a text file which can be searched. Link to comment Share on other sites More sharing options...
G+_610GARAGE Posted December 4, 2015 Share Posted December 4, 2015 Is it just the one file? It could be that the file is corrupt and the end of file descriptor is missing. That's just a shot in the dark though. Link to comment Share on other sites More sharing options...
G+_Rud Dog Posted December 4, 2015 Author Share Posted December 4, 2015 Was able to open it using another text program Link to comment Share on other sites More sharing options...
Recommended Posts