seb-m / pyinotify

Monitoring filesystems events with inotify on Linux.
http://github.com/seb-m/pyinotify/wiki
MIT License
2.29k stars 379 forks source link

question on how to use without chaging code too much #200

Open daviidarr opened 2 years ago

daviidarr commented 2 years ago

Hi,

My code is structured like the below. How could i use pyinotify in main, ie from within the run function ?

if name == "main": asyncio.run(main()) async def main() asyncio.gather(a,enter_this_whenever_a_file_is_modified) async def a(): while True: do_a() async def enter_this_whenever_a_file_is_modified(): how should i write this coroutine ?