A straw-man solution in Python that monitors a directory for changes
(Linux only):
#!/usr/bin/env python2
import sys
import os
if sys.platform not in ("linux2",):
sys.exit("%s only runs on Linux" % os.path.basename(sys.argv[0]))
# TODO: we should check that kernel version >= 2.4.19
# e.g. w
Raghul wrote:
Is it possible to monitor a folder in the python?My question is if I
put any file in it that particular folder my script should monitor the
folder and read the file name.If so what function can I use?
Thanx in advance
If you do not want to poll (check for changes yourself regularly),