如何监视Python文件的更改? [英] How to monitor Python files for changes?
本文介绍了如何监视Python文件的更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何从导入的包/模块?
如何有效地检测修改后的Python文件?有没有一个库来做到这一点?
无耻的插件。还有 http://github.com/gorakhargosh/watchdog ,我正在努力做到这一点。HTH。
I want to restart my Python web application, if code gets changed. But there could be a large number of files that could be changed, since files in imported modules could change ...
How to get the actual file names from imported packages / modules?
How can modified Python files be detected efficiently? Is there a library to do that?
解决方案
Shameless plug. There's also http://github.com/gorakhargosh/watchdog that I'm working on to do exactly this.
HTH.
这篇关于如何监视Python文件的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文