西西弗斯指挥官
sis的Python项目详细描述
西西弗斯是一个小的帮助脚本,重新运行任意命令一遍又一遍。可怜的sisyphus将作为命令执行参数列表,监视当前目录的更改,并在每次检测到修改时重新运行该命令。此外,当检测到修改并重新启动时,它将终止长时间运行的命令。
它基于pyinotify示例脚本“[autocompile.py](https://github.com/seb-m/pyinotify/blob/master/python2/examples/autocompile.py)”。
您可以使用Sisyphus来
- auto-compile your program
- auto-run your test suite
- auto-restart your development server
- auto-refresh your browser (i.e., via [MozRepl](https://github.com/bard/mozrepl/wiki)) when doing web development
- auto-restart your unsuccessful shell command until it succeeds.
保存程序后,不必离开编辑器就可以方便地查看程序的输出。但请记住:你的行为可能会让西西弗陷入生存危机中,面对生命荒谬的问题。
要求
- Linux ≥ 2.6.13
- [pyinotify](https://github.com/seb-m/pyinotify)
- Both Python 2.x and 3.x are supported
安装
pip install sis
示例
sis -d src make
sis -e hs cabal test
sis -s ‘lynx -dump http://my-web-app/’
忽略模式
Sisyphus将忽略与下列文件中的任何正则表达式模式匹配的文件中的更改:
- /etc/sisignore
- ~/.sisignore
- .sisignore