view python/actions.py @ 254:56537ed6ebc6

sample actions file with dependencies (stub)
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 16 Dec 2012 22:21:17 -0800
parents
children 1f7325245dc8
line wrap: on
line source

#!/usr/bin/env python

class Actions(object):

    def __init__(self):
        self.functions = {}

    def __call__(self, function):
        return function

action = Actions()

@action
def foo():
    print "hello"

@action
def bar():
    print "goodbye"

if __name__ == '__main__':
    pass