mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Allow multiple Python Path elements to be given in a semi-colon delimited list.
This commit is contained in:
parent
185ac442fc
commit
2354c3e07d
@ -37,8 +37,15 @@ Server::Server(quint16 port)
|
||||
|
||||
if (python_path.length() > 0)
|
||||
{
|
||||
// Split the path setting into individual entries
|
||||
QStringList path_list = python_path.split(";", QString::SkipEmptyParts);
|
||||
|
||||
// Get the current path
|
||||
PyObject* sysPath = PySys_GetObject((char*)"path");
|
||||
PyList_Append(sysPath, PyString_FromString(python_path.toUtf8().data()));
|
||||
|
||||
// Add new additional path elements
|
||||
for (int i = 0; i < path_list.size(); ++i)
|
||||
PyList_Append(sysPath, PyString_FromString(path_list.at(i).toUtf8().data()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user