Skip to main content
3 events
when toggle format what by license comment
Jul 11, 2019 at 8:31 comment added BlackJack @imp I think all answers here are wrong because they try to answer the question on a close event on file system level whereas your comment suggests you want the close event on application level‽ Closing a file on file system level is something different than closing a document in an application unless the application really opens the file at the beginning and closes it at the end. Which is quite unlikely in the case of text editors. When opening a document they open the file, read the content, and close it. Closing the document in the editor then generates no event on file system level!
Mar 25, 2014 at 13:38 comment added imp I am able to catch the modified event by os.path.getmtime(filename).Actually I want to delete the file as soon as it is closed(both either file is close from a tab of notepad++ or normal notepad). User can modify a file many times before closing a file.
Mar 24, 2014 at 19:34 history answered Andy CC BY-SA 3.0