SetPythonPath is a helper for setting PYTHONPATH.
(p []string)
| 19 | |
| 20 | // SetPythonPath is a helper for setting PYTHONPATH. |
| 21 | func SetPythonPath(p []string) { |
| 22 | mergedPaths := strings.Join(p, ":") |
| 23 | path := C.CString(mergedPaths) |
| 24 | defer C.free(unsafe.Pointer(path)) |
| 25 | key := C.CString(pythonPathKey) |
| 26 | defer C.free(unsafe.Pointer(key)) |
| 27 | C.setenv(key, path, 1) |
| 28 | } |
| 29 | |
| 30 | // LoadModuleDict wraps PyModule_GetDict. |
| 31 | func LoadModuleDict(m string) (unsafe.Pointer, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected