Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
merged 4 commits into from
Oct 9, 2018

Conversation

idanmiara
Copy link
Contributor

@idanmiara idanmiara commented Oct 9, 2018

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.
@idanmiara
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
@pyscripter
Copy link
Owner

pyscripter commented Oct 10, 2018

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

@idanmiara
Copy link
Contributor Author

idanmiara commented Oct 10, 2018 via email

@pyscripter
Copy link
Owner

pyscripter commented Oct 10, 2018

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;

@idanmiara
Copy link
Contributor Author

idanmiara commented Oct 10, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants