Returns Python Interpreter from the system settings. If none found in the settings file then the currently running interpreter is returned. :return: Full path to python interpreter (uses settings file or sys.executable) :rtype: (str)
()
| 23244 | |
| 23245 | |
| 23246 | def execute_py_get_interpreter(): |
| 23247 | """ |
| 23248 | Returns Python Interpreter from the system settings. If none found in the settings file |
| 23249 | then the currently running interpreter is returned. |
| 23250 | |
| 23251 | :return: Full path to python interpreter (uses settings file or sys.executable) |
| 23252 | :rtype: (str) |
| 23253 | """ |
| 23254 | pysimplegui_user_settings.load() # Refresh the settings just in case they've changed via another program |
| 23255 | interpreter = pysimplegui_user_settings.get('-python command-', '') |
| 23256 | if interpreter == '': |
| 23257 | interpreter = sys.executable |
| 23258 | return interpreter |
| 23259 | |
| 23260 | |
| 23261 | def execute_py_get_running_interpreter(): |