การ monitor ไฟล์ข้ามแพลตฟอร์มยาก แต่ Python มีไลบรารี watchdog ที่นิยมใช้ ติดตั้งด้วย: $ pip install watchdog ตัวอย่าง: ติดตามไฟล์ my_file.txt import time from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class MyHandler(FileSystemEventHandler): def on_m