!pip install pyinotify
Collecting pyinotify
  Downloading pyinotify-0.9.6.tar.gz (60kB)
    100% |████████████████████████████████| 61kB 1.0MB/s 
Installing collected packages: pyinotify
  Running setup.py install for pyinotify ... - done
Successfully installed pyinotify-0.9.6
import pyinotify

# Instanciate a new WatchManager (will be used to store watches).
wm = pyinotify.WatchManager()
# Associate this WatchManager with a Notifier (will be used to report and
# process events).
notifier = pyinotify.Notifier(wm)
# Add a new watch on /tmp for ALL_EVENTS.
wm.add_watch('/home/paws', pyinotify.ALL_EVENTS)
# Loop forever and handle events.
notifier.loop()
<Event dir=False mask=0x100 maskname=IN_CREATE name=huh path=/home/paws pathname=/home/paws/huh wd=1 >
<Event dir=False mask=0x20 maskname=IN_OPEN name=huh path=/home/paws pathname=/home/paws/huh wd=1 >
<Event dir=False mask=0x4 maskname=IN_ATTRIB name=huh path=/home/paws pathname=/home/paws/huh wd=1 >
<Event dir=False mask=0x8 maskname=IN_CLOSE_WRITE name=huh path=/home/paws pathname=/home/paws/huh wd=1 >
<Event dir=False mask=0x20 maskname=IN_OPEN name=.bash_history path=/home/paws pathname=/home/paws/.bash_history wd=1 >
<Event dir=False mask=0x2 maskname=IN_MODIFY name=.bash_history path=/home/paws pathname=/home/paws/.bash_history wd=1 >
<Event dir=False mask=0x8 maskname=IN_CLOSE_WRITE name=.bash_history path=/home/paws pathname=/home/paws/.bash_history wd=1 >
<Event dir=False mask=0x20 maskname=IN_OPEN name=Untitled2.ipynb path=/home/paws pathname=/home/paws/Untitled2.ipynb wd=1 >
<Event dir=False mask=0x100 maskname=IN_CREATE name=.~Untitled2.ipynb path=/home/paws pathname=/home/paws/.~Untitled2.ipynb wd=1 >
<Event dir=False mask=0x20 maskname=IN_OPEN name=.~Untitled2.ipynb path=/home/paws pathname=/home/paws/.~Untitled2.ipynb wd=1 >
<Event dir=False mask=0x1 maskname=IN_ACCESS name=Untitled2.ipynb path=/home/paws pathname=/home/paws/Untitled2.ipynb wd=1 >
<Event dir=False mask=0x2 maskname=IN_MODIFY name=.~Untitled2.ipynb path=/home/paws pathname=/home/paws/.~Untitled2.ipynb wd=1 >
<Event dir=False mask=0x8 maskname=IN_CLOSE_WRITE name=.~Untitled2.ipynb path=/home/paws pathname=/home/paws/.~Untitled2.ipynb wd=1 >
<Event dir=False mask=0x10 maskname=IN_CLOSE_NOWRITE name=Untitled2.ipynb path=/home/paws pathname=/home/paws/Untitled2.ipynb wd=1 >
<Event dir=False mask=0x4 maskname=IN_ATTRIB name=.~Untitled2.ipynb path=/home/paws pathname=/home/paws/.~Untitled2.ipynb wd=1 >
<Event dir=False mask=0x2 maskname=IN_MODIFY name=Untitled2.ipynb path=/home/paws pathname=/home/paws/Untitled2.ipynb wd=1 >
<Event dir=False mask=0x20 maskname=IN_OPEN name=Untitled2.ipynb path=/home/paws pathname=/home/paws/Untitled2.ipynb wd=1 >
<Event dir=False mask=0x2 maskname=IN_MODIFY name=Untitled2.ipynb path=/home/paws pathname=/home/paws/Untitled2.ipynb wd=1 >
<Event dir=False mask=0x8 maskname=IN_CLOSE_WRITE name=Untitled2.ipynb path=/home/paws pathname=/home/paws/Untitled2.ipynb wd=1 >
<Event dir=False mask=0x200 maskname=IN_DELETE name=.~Untitled2.ipynb path=/home/paws pathname=/home/paws/.~Untitled2.ipynb wd=1 >
<Event dir=False mask=0x20 maskname=IN_OPEN name=.bash_history path=/home/paws pathname=/home/paws/.bash_history wd=1 >
<Event dir=False mask=0x2 maskname=IN_MODIFY name=.bash_history path=/home/paws pathname=/home/paws/.bash_history wd=1 >
<Event dir=False mask=0x8 maskname=IN_CLOSE_WRITE name=.bash_history path=/home/paws pathname=/home/paws/.bash_history wd=1 >
@interact_manual
def say(text='hello'):
    print(text)
hellojhb
from pywikibot import Site
s = Site()