diff options
Diffstat (limited to 'source4/scripting/python/modules.c')
-rw-r--r-- | source4/scripting/python/modules.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c index 6a766f3412..2a88870660 100644 --- a/source4/scripting/python/modules.c +++ b/source4/scripting/python/modules.c @@ -43,3 +43,11 @@ void py_load_samba_modules(void) PyImport_ExtendInittab(&py_modules[i]); } } + +void py_update_path(const char *bindir) +{ + char *newpath; + asprintf(&newpath, "%s:%s/python:%s/../scripting/python", Py_GetPath(), bindir, bindir); + PySys_SetPath(newpath); + free(newpath); +} |