From: | Jan Alexander Steffens <jan(dot)steffens(at)gmail(dot)com> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: [pgAdmin4] [PATCH] Simplify Server's python setup |
Date: | 2017-01-26 19:22:49 |
Message-ID: | CAMQ-g0eDvgKLQ8Qv2PUYOhkY2VurWarobOcyi1oa4+kOVUNPNw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
On Thu, Jan 26, 2017 at 3:58 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
> In the meantime, I'm thinking something like the attached patch would
> be more appropriate. The only issue I can find with it at the moment
> (having just tested on a Mac dev environment for now) is that if
> initialisation fails and you enter a new Python Executable path, the
> Py_Finalize()/Py_Initialize cycle isn't enough to make the change - it
> seems to be because Py_SetProgramName() doesn't have any effect when
> called again. In other words, you can give it the correct interpreter
> and hit OK to attempt to run the server again, but it still won't work
> until you actually restart the app.
>
> Any ideas?
>
Looking through the cpython code, Py_SetPath(NULL) clears the calculated
module search path again. Try calling this before the Py_Initialize.
From | Date | Subject | |
---|---|---|---|
Next Message | George Gelashvili | 2017-01-26 20:48:01 | Re: [Patch] Refactor sql template version picking |
Previous Message | George Gelashvili | 2017-01-26 17:22:44 | [Patch] Refactor sql template version picking |