def batch_code_exec(caller):
 ptr = caller.ndb.batch_stackptr
 stack = caller.ndb.batch_stack
 debug = caller.ndb.batch_debug
 code = stack[ptr]
 caller.msg(format_header(caller, code))
 err = BATCHCODE.code_exec(code, extra_environ={'caller': caller}, debug=debug)
 if err:
  caller.msg(format_code(err))
  return False
 return True

def batch_code_exec ( caller ) : ptr = caller . ndb . batch_stackptr stack = caller . ndb . batch_stack debug = caller . ndb . batch_debug code = stack [ ptr ] caller . msg ( format_header ( caller , code ) ) err = BATCHCODE . code_exec ( code , extra_environ = { 'caller' : caller } , debug = debug ) if err : caller . msg ( format_code ( err ) ) return False return True
helper function for executing a single batch-code entry .