Skip to main content
The 2024 Developer Survey results are live! See the results
3 of 3
edited tags
Anshul Goyal
  • 75.6k
  • 38
  • 155
  • 193

How to get a file close event in python

Using python 2.7 on windows 7 64 bit machine.

How to get a file close event:

  1. when file is opened in a new process of file opener (like notepad, wordpad which opens file everytime in new process of wordpad)
  2. when file is opened in a tab of file opener (like notepad++, which opens all files in new tab but there exist only a single process of notepad++ running)

So, how to get file close event in above cases? Is it possible to achieve above cases through a common code? I am dealing with different file types

imp
  • 2k
  • 3
  • 29
  • 42