Hi everyone,
is it possible to configure on how python is executed in JMP? So that i could either use "jmp_python.exe" or "jmp_pythonw.exe"?
For my python GUI the GUI is blocking python/JMP. Allready discussed here: (Custom) Python GUI executed in JMP
With JMP19+ I now can see that "jmp_pythonw.exe" is also included.
However, I struggle to define that pythonw is ussed. Either with
lc = log capture(EXECUTE = Python Execute({}, {response}, pyCode));
or
PythonConnection = Python Connect();
lc = log capture(EXECUTE = PythonConnection << Execute({}, {response}, pyCode));
i do not see the option to specify that.
Does anyone have a suggestion?
Thx, Daniel
Within the Python environment there are two constants jmp.PYTHON_EXE and jmp.PYTHONW_EXE which will give you the full path to the installed Python Executable ( PYTHONW_EXE only exists on Windows, while jmp.PYTHON_EXE is present on macOS and Windows). To utilize the same site-packages directory that you have installed with JMP, take a look inside jmputils.py. A copy of which is included in the SAMPLE_SCRIPTS/Python directory. Look at the code there on how to set up your environment before calling out the Python executable supplied by JMP. This won't change what Python Submit(), Python Execute() or any of the embedded Python support via the import jmp package, but you can use Run Program() or from Python with subprocess or multiprocessing.