changeset 254:56537ed6ebc6

sample actions file with dependencies (stub)
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 16 Dec 2012 22:21:17 -0800
parents 8593b0384d3e
children 1f7325245dc8
files python/actions.py
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/python/actions.py	Sun Dec 16 22:21:17 2012 -0800
@@ -0,0 +1,22 @@
+#!/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