Message10656

Author darjus
Recipients darjus, jeff.allen, teeohhem, zyasoft
Date 2016-01-19.10:59:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453201148.88.0.667322737391.issue2441@psf.upfronthosting.co.za>
In-reply-to
Content
Down the rabbit hole: https://mail.python.org/pipermail/python-dev/2006-March/062453.html https://mail.python.org/pipermail/python-list/2015-March/687466.html http://forum.freecadweb.org/viewtopic.php?t=8399

To summarize: in CPython if it is embedded, they provide the executable path of the executing program and not None, even though sys.executable may be None according to Python documentation. I literally could not find a case on the web for 'if sys.executable is None' except in Jython. And apparently this is a recurring issue ( http://bugs.jython.org/issue1452 ) for us.

The usage of sys.executable from the perspective of the user in an embedded system is mostly useless (you can't execute python again via uwsgi or py2exe), but it saves it from the Billion Dollar Mistake (https://en.wikipedia.org/wiki/Null_pointer).

Where I'm going with this is instead of sprinkling sys.executable is None all over the world, we stick java.home property + /bin/java(.exe).

What do you guys think?
History
Date User Action Args
2016-01-19 10:59:08darjussetmessageid: <1453201148.88.0.667322737391.issue2441@psf.upfronthosting.co.za>
2016-01-19 10:59:08darjussetrecipients: + darjus, zyasoft, jeff.allen, teeohhem
2016-01-19 10:59:08darjuslinkissue2441 messages
2016-01-19 10:59:07darjuscreate