Skip to content

Conversation

@idanmiara
Copy link
Contributor

I've implemented this feature it as you suggested.

@pyscripter
Copy link
Owner

pyscripter commented Oct 15, 2018

PythonVersionFromPath was meant to be used with the home path of python. So it checks whether python.exe exists in the same folder as the python??.dll. In QGIS is python.exe located in the same folder as the dll? And if there more than one dll's are located in the bin folder to which version python.exe corresponds to?

  // check if same platform
  try
    if {$IFDEF CPUX64}not {$ENDIF}IsEXEx64(DLLPath+'\python.exe') then Exit;
  except
    Exit;
  end;

@idanmiara
Copy link
Contributor Author

idanmiara commented Oct 15, 2018 via email

@pyscripter
Copy link
Owner

pyscripter commented Oct 15, 2018

As mentioned above PythonVersionFromPath was meant to be used with the home path of python and not with another path that just contains dlls and exes. Other PythonVersions functionality will not work (is_venv, is_virtualenv etc.). Also, your version PythonVersionFromPath is much slower than the original, since it uses FileExist for all possible python??.dll.

QGIS folder setup is a special case that you can accomodate in your own code.

@pyscripter pyscripter closed this Oct 15, 2018
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