Watchdog: Python filesystem event triggers - Advent of Code Python Libraries 2021

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2021
  • This library braces on the edge of being a framework, but it allows you to trigger a block of code when a file changes, and does it efficiently - cross-platform, it hooks into the OS to monitor a file or a folder, and then fires events at a registered object when something changes.
    Basically, How to detect a file changing on the OS, in python.
    What's nice about this is that by hooking into the OS it's highly performant - not only is it nearly completely dormant when there are no changes, it's incredibly fast to react when there is.
    This is one of those libraries to be aware of and have in your arsenal to pull out when you need it - the only challenge here is if you're using any other framework, is how to get it to tie in nicely - but often this is solvable with a bit of thinking.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 1

  • @_indrid_cold_
    @_indrid_cold_ 2 ปีที่แล้ว +1

    The best tutorial on this subject I was able to find. Thank you!