Python script rereplace stops working
Have written a small python script that would do a regular expression replace on each line changing a Epoch timestamp to a nicely formatted date/time. This operation is intended for our log files, so these files can get up to 20MB in size. What I find is that from time to time on larger files the rereplace stops working and shows a number of “CRLF” markings in the file.
Here is the script:
return time.strftime(“%Y-%m-%d %H:%M:%S”, time.localtime(int(m.group(1)) + 978307200))
Any idea on why this might be happening? I re-wrote it to apply the rereplace on “chunks” of the file, but it appeared to make no difference. Also no difference if I avoided the undo action. However, if you do the undo occasionally it crashes Notepad++.
Make sure you have periodic back ups turned off in the settings.