python watchdog: definition of commands in file -


i use grunt , gruntfile.js watch files , launch test, like this

// gruntfile.js module.exports = function(grunt){     grunt.initconfig({         watch: {             grunt: {                 files: ['gruntfile.js']             },             python: {                 files : ['./tests/*.py','./libs/*/*.py'],                 tasks: ['pythontest'],             },         }     });      grunt.registertask('pythontest', function(){         grunt.util.spawn({             cmd: 'python',             args: ['setup.py','test'],             opts: {stdio: 'inherit'},         });     });      grunt.registertask('default', ['watch']);  }; 

i'm searching python solution, watchdog.

for defition of task , commands, watchdog have file similar gruntfile.js ?

for single command, use watchmedo script command installed in python's watchdog module:

watchmedo shell-command --patterns="*.py" --recursive --command='echo python setup.py test # "${watch_src_path}"' 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -