pymonitor.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:python-awesome-web 作者: tianzhenyun 项目源码 文件源码
def start_watch(path, callback):
    observer = Observer()
    observer.schedule(MyFileSystemEventHandler(restart_process), path, recursive=True)
    observer.start()

    log('Watching directory {}...'.format(path))
    start_process()
    try:
        while True:
            time.sleep(2)
    except KeyboardInterrupt:
        observer.stop()
    observer.join()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号