add boundFunction to Tools
[enigma2.git] / lib / python / Tools / BoundFunction.py
diff --git a/lib/python/Tools/BoundFunction.py b/lib/python/Tools/BoundFunction.py
new file mode 100644 (file)
index 0000000..5447451
--- /dev/null
@@ -0,0 +1,6 @@
+class boundFunction:
+       def __init__(self, fnc, *args):
+               self.fnc = fnc
+               self.args = args
+       def __call__(self, *args):
+               self.fnc(*self.args + args)