Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: c56d84f404
Fetching contributors…

Cannot retrieve contributors at this time

executable file 22 lines (16 sloc) 0.561 kB
#!/usr/bin/env python
import pyinotify
import os
wm = pyinotify.WatchManager() # Watch Manager
mask = pyinotify.IN_CREATE # watched events
cmd = "lessc -x hicap/static/main.less > hicap/static/css/main.css"
class EventHandler(pyinotify.ProcessEvent):
def process_IN_CREATE(self, event):
if event.name.endswith('.less'):
os.system('date')
print "Creating:", event.pathname
os.system(cmd)
handler = EventHandler()
notifier = pyinotify.Notifier(wm, handler)
wdd = wm.add_watch('hicap/static/less/', mask, rec=True)
notifier.loop()
Jump to Line
Something went wrong with that request. Please try again.