def get_handlers(halcomp, builder, useropts): global debug for cmd in useropts: exec cmd in globals() set_debug(debug) return [HandlerClass(halcomp, builder, useropts)]
def get_handlers(halcomp,builder,useropts): global debug for cmd in useropts: exec cmd in globals() set_debug(debug) return [HandlerClass(halcomp,builder,useropts)]
def get_handlers(halcomp,builder,useropts): global debug for cmd in useropts: exec(cmd, globals()) # get some detail what save/restore etc are doing set_debug(debug) return [HandlerClass(halcomp,builder,useropts)]
def get_handlers(halcomp,builder,useropts): global debug for cmd in useropts: exec cmd in globals() # get some detail what save/restore etc are doing set_debug(debug) return [HandlerClass(halcomp,builder,useropts)]
def get_handlers(halcomp, builder, useropts): ''' this function is called by gladevcp at import time (when this module is passed with '-u <modname>.py') return a list of object instances whose methods should be connected as callback handlers any method whose name does not begin with an underscore ('_') is a callback candidate the 'get_handlers' name is reserved - gladevcp expects it, so do not change ''' # try this at command line: # -U debug=42 -U "print 'debug=%d' % debug" global debug for cmd in useropts: exec(cmd, globals()) set_debug(debug) if debug: print("%s.get_handlers() called" % (__name__)) return [HandlerClass(halcomp, builder, useropts)]
def get_handlers(halcomp,builder,useropts): ''' this function is called by gladevcp at import time (when this module is passed with '-u <modname>.py') return a list of object instances whose methods should be connected as callback handlers any method whose name does not begin with an underscore ('_') is a callback candidate the 'get_handlers' name is reserved - gladevcp expects it, so do not change ''' # try this at command line: # -U debug=42 -U "print 'debug=%d' % debug" global debug for cmd in useropts: exec cmd in globals() set_debug(debug) if debug: print "%s.get_handlers() called" % (__name__) return [HandlerClass(halcomp,builder,useropts)]