Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SetPythonHome; Ansi/UTF8 eval; warning silent #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
pyscripter merged 4 commits into pyscripter:master from talos-gis:master
Oct 9, 2018

Conversation

@idanmiara
Copy link
Contributor

@idanmiara idanmiara commented Oct 9, 2018
edited
Loading

Hi,

Please review and merge these changes:

  1. SetPythonHome - required for instance for supporting OSGEO4W Python without setting environment variable externally. (setting environment variable internally from within the app doesn't work for PythonHome, thus the use of this function)
  2. Ansi/UTF8 eval/execute according to Python version
  3. silent a redundant warning

RE: Option to use latest DLL: needed for machines with both 2.7 and 3.x that want to use 3.x. changes the version search to be reversed (last version is tested first)
You wrote: Have a look at PythonVersions.pas. It does all that and more.
Please advise how to make Python4delphi prefer the newer python version.

Kind Regards,
Idan

Idan Miara and others added 4 commits October 9, 2018 11:18
...as(9758): W1002 Symbol 'SetPrecisionMode' is specific to a platform
which is {$IFNDEF NEXTGEN} anyway.
...f8; ToPythonRawString will make the right RawString.
Copy link
Contributor Author

Thanks!

@idanmiara idanmiara changed the title (削除) SetPythonHome; Ansi/UTF8 eval; warning sielnt (削除ここまで) (追記) SetPythonHome; Ansi/UTF8 eval; warning silent (追記ここまで) Oct 10, 2018
Copy link
Owner

pyscripter commented Oct 10, 2018
edited
Loading

Thank you! At which point do you call SetPythonHome? I was thinking of introducing a published property PyhtonHome.

Copy link
Contributor Author

idanmiara commented Oct 10, 2018 via email

Just before LoadDll, as Py_SetPythonHome needs to be called after you load the dll and before you call Py_Initialize.
...
On 2018年10月10日 at 09:39, pyscripter ***@***.***> wrote: At which point do you call SetPythonHome? I was thinking of introducing a published property PyhtonHome. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#59 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AZIQrfEWPxAGShuMbV28SsgC80EhuCMhks5ujZYOgaJpZM4XSTbs> .

Copy link
Owner

pyscripter commented Oct 10, 2018
edited
Loading

That is where Py_SetPythonHome is called in PythonEngine.pas. I can see that. I was asking about when do you call SetPythonHome which sets the fields FPythonHomeW and FPythonHome.

I guess you are setting AutoLoad to False;

Copy link
Contributor Author

idanmiara commented Oct 10, 2018 via email

Sorry if I wasn't clear :) I call it just before I call PyEngine.LoadDll.
...
On 2018年10月10日 at 10:01, pyscripter ***@***.***> wrote: That is where Py_SetPythonHome is called in PythonEngine.pas. I can see that. I was asking about when do you call SetPythonHome which sets the fields FPythonHomeW and FPythonHome. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#59 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AZIQrQjIvNVIh4scr7quWLv_AWjiqw_-ks5ujZssgaJpZM4XSTbs> .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /