17 Function to determine the path of the (non-windowed) Python executable. |
17 Function to determine the path of the (non-windowed) Python executable. |
18 |
18 |
19 @return path of the Python executable |
19 @return path of the Python executable |
20 @rtype str |
20 @rtype str |
21 """ |
21 """ |
22 if sys.platform.startswith("linux"): |
22 if sys.platform.startswith(("linux", "freebsd")): |
23 return sys.executable |
23 return sys.executable |
24 elif sys.platform == "darwin": |
24 elif sys.platform == "darwin": |
25 return sys.executable.replace("pythonw", "python") |
25 return sys.executable.replace("pythonw", "python") |
26 else: |
26 else: |
27 return sys.executable.replace("pythonw.exe", "python.exe") |
27 return sys.executable.replace("pythonw.exe", "python.exe") |