Closed gnani-g closed 8 years ago
Tried a few ways. Even the following doesn't seem to work.
// arguments _a := python.PyTuple_New(1) python.PyTuple_SET_ITEM(_a, 0, python.PyString_FromString(`test.mp3`)) // keyword arguments _kw := python.PyDict_New() python.PyDict_SetItem(_kw, python.PyString_FromString(`v2_version`), python.PyInt_FromLong(3)) // pack arguments _args := python.PyTuple_New(2) python.PyTuple_SET_ITEM(_args, 0, _a) python.PyTuple_SET_ITEM(_args, 1, _kw) // ID3 is a callable id3 := ID3.CallObject(_args) if id3 == nil { panic("failed") }
could you give 595aa16 a try? see this example for instructions: https://github.com/sbinet/go-python/blob/kw-args/tests/kw-args/main.go
@sbinet, The func Call works with and without arguments. Thanks.
Call
Tried a few ways. Even the following doesn't seem to work.