Skip to content

Instantly share code, notes, and snippets.

@lov3catch
Created April 10, 2015 13:20
Show Gist options
  • Save lov3catch/b5f73a82f6aadec31d90 to your computer and use it in GitHub Desktop.
Save lov3catch/b5f73a82f6aadec31d90 to your computer and use it in GitHub Desktop.
runner
# -*-coding:utf-8;-*-
from __future__ import unicode_literals
import time
def run_checker(fn):
def wrapped():
print 'check'
return fn()
return wrapped
@run_checker
def run():
print 'run'
while True:
run()
time.sleep(3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment