From: Michael H. <gi...@gi...> - 2012-07-31 21:27:38
|
gladevcp: cleanup docs, examples http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=e6723e9 --- configs/gladevcp/class-callback/class_callback.py | 2 -- configs/gladevcp/hitcounter.py | 2 -- configs/gladevcp/templates/classhandler.py | 3 --- docs/src/gui/gladevcp.txt | 5 +++-- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/configs/gladevcp/class-callback/class_callback.py b/configs/gladevcp/class-callback/class_callback.py index ae7355a..042eabe 100644 --- a/configs/gladevcp/class-callback/class_callback.py +++ b/configs/gladevcp/class-callback/class_callback.py @@ -4,8 +4,6 @@ import time from inspect import stack -debug = 1 - class OtherClass: ''' methods in this class are not exposed as callback handlers diff --git a/configs/gladevcp/hitcounter.py b/configs/gladevcp/hitcounter.py index 28e2be5..521c134 100644 --- a/configs/gladevcp/hitcounter.py +++ b/configs/gladevcp/hitcounter.py @@ -2,8 +2,6 @@ import hal import glib import time -debug = 1 - class HandlerClass: ''' class with gladevcp callback handlers diff --git a/configs/gladevcp/templates/classhandler.py b/configs/gladevcp/templates/classhandler.py index 2657b1b..d996b49 100644 --- a/configs/gladevcp/templates/classhandler.py +++ b/configs/gladevcp/templates/classhandler.py @@ -24,8 +24,6 @@ import glib -debug = 0 - class HandlerClass: @@ -55,7 +53,6 @@ class HandlerClass: def get_handlers(halcomp,builder,useropts): - global debug for cmd in useropts: exec cmd in globals() diff --git a/docs/src/gui/gladevcp.txt b/docs/src/gui/gladevcp.txt index 9b9675a..7ef1bc9 100644 --- a/docs/src/gui/gladevcp.txt +++ b/docs/src/gui/gladevcp.txt @@ -1208,8 +1208,9 @@ Here is a minimum user-defined handler example module: class MyCallbacks : def on_this_signal(self,obj,data=None): print "this_signal happened, obj=",obj - def get_handlers(halcomp,builder,useropts): - return [MyCallbacks ()] + +def get_handlers(halcomp,builder,useropts): + return [MyCallbacks ()] ---------------------------------- Now, 'on_this_signal' will be available as signal handler to your |