MCPcopy Create free account
hub / github.com/TykTechnologies/tyk / SetPythonPath

Function SetPythonPath

dlpython/helpers.go:21–28  ·  view source on GitHub ↗

SetPythonPath is a helper for setting PYTHONPATH.

(p []string)

Source from the content-addressed store, hash-verified

19
20// SetPythonPath is a helper for setting PYTHONPATH.
21func 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.
31func LoadModuleDict(m string) (unsafe.Pointer, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected