def ClassFun(self, afs, ival, sval): tfs = funcs.FunStruct(handle=afs) print("in python class fun: FieldI: ", tfs.FieldI, " FieldS: ", tfs.FieldS, " ival: ", ival, " sval: ", sval)
def cbfun(afs, ival, sval): tfs = funcs.FunStruct(handle=afs) print("in python cbfun: FieldI: ", tfs.FieldI, " FieldS: ", tfs.FieldS, " ival: ", ival, " sval: ", sval)
def cbfunrval(afs, ival, ifval): tfs = funcs.FunStruct(handle=afs) print("in python cbfunrval: FieldI: ", tfs.FieldI, " FieldS: ", tfs.FieldS, " ival: ", ival, " ifval: ", ifval) return True
# Copyright 2015 The go-python Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. ## py2/py3 compat from __future__ import print_function import go, funcs fs = funcs.FunStruct() fs.FieldS = "str field" fs.FieldI = 42 def cbfun(afs, ival, sval): tfs = funcs.FunStruct(handle=afs) print("in python cbfun: FieldI: ", tfs.FieldI, " FieldS: ", tfs.FieldS, " ival: ", ival, " sval: ", sval) def cbfunif(afs, ival, ifval): tfs = funcs.FunStruct(handle=afs) print("in python cbfunif: FieldI: ", tfs.FieldI, " FieldS: ", tfs.FieldS, " ival: ", ival, " ifval: ", ifval) def cbfunrval(afs, ival, ifval): tfs = funcs.FunStruct(handle=afs) print("in python cbfunrval: FieldI: ", tfs.FieldI, " FieldS: ", tfs.FieldS, " ival: ", ival, " ifval: ", ifval) return True