func (mod *Module) Filename() (string, error) { ret := C.PyModule_GetFilename(mod.c()) if ret == nil { return "", exception() } return C.GoString(ret), nil }
// char* PyModule_GetFilename(PyObject *module) // Return the name of the file from which module was loaded using moduleās __file__ attribute. If this is not defined, or if it is not a string, raise SystemError and return NULL. func PyModule_GetFilename(self *PyObject) string { c_name := C.PyModule_GetFilename(topy(self)) // we do not own c_name... return C.GoString(c_name) }