[QGIS-Developer] discover python executable in use
Andreas Plesch
andreasplesch at gmail.com
Mon Jun 5 06:49:23 PDT 2017
Using the Python console on 2.18
import sys
sys.executable
returns
1) on Windows (2.18.9 32bit):
'C:\\PROGRA~1\\QGIS2~1.18\\bin\\qgis-bin.exe'
which unexpectedly does not appear to be a Python interpreter
and
2) on Linux (2.18.3. 64bit)
'/usr/bin/python'
which does appear to be the Python interpreter in use by the console.
Is there a cross platform way to discover the Python interpreter in current
use ? Would 1) considered to be a possible bug somewhere ?
I want to use it for
QProcess.startDetached(sys.executable, args, root_folder)
Thanks,
-Andreas
--
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170605/77e9a313/attachment-0001.html>
More information about the QGIS-Developer
mailing list