IDE Integration¶
To use the MORe scripting API MORe can be integrated into an IDE.
For the integration into any IDE, you will need to know the installation path of MORe. The path can be displayed as follows:
open a command prompt (type “cmd” in the windows start menu)
write “echo %MORE_INSTALLDIR” and press enter
Spyder¶
Starting with MORe 5.1, Spyder is no longer installed into the MORe environment by default. In order to continue using Spyder, Spyder standalone has to be installed.
Compatibility¶
Spyder requires spyder-kernels being installed in the MORe python environment.
MORe ships with the latest version of spyder-kernels that is available at build time.
Compatibility of Spyder to spyder-kernels can be checked here: https://docs.spyder-ide.org/current/troubleshooting/common-illnesses.html#spyder-kernels-not-installed-incompatible
Check the version of spyder-kernels that is installed with your MORe version:
open MORe from the shortcut
locate the command window
type: import spyder_kernels; spyder_kernels.__version__
Installation¶
Download the installer from https://www.spyder-ide.org and follow the instructions of the installer.
Integrate MORe¶
Start Spyder from the Start Menu
Go to Tools → Preferences → Python interpreter
Select “Use the following python interpreter”, click the select file icon, paste “%MORE_INSTALLDIR%\env\python.exe” to the filename and click ok. Alternatively you can also browse to “MORe installation directory”\env\python.exe.
Restart the console by clicking the cross next to “Console 1/A”
Click on open file, the paste “%MORE_INSTALLDIR%\python\MORe.ipy” to the filename field. Alternatively browse to “MORe installation directory”\python\MORe.ipy. Make sure to allow the opening of .ipy files in the file dialog.
Run the startup script.
When running the first time, a popup asking for “Run settings” will appear. Chose “Run file with default configuration”
PyCharm¶
Installation¶
Download PyCharm Community (make sure to scroll down and download the Community Editon. Do not download the Professional Edition, unless you have a license for it) from https://www.jetbrains.com/pycharm/download/ and follow the instructions of the installer.
Integrate MORe¶
Start PyCharm from the Start Menu
Select “open project”
In the dialog browse to “MORe installation directory”\python. If the installation directory is in AppData, you might need to enable “show hidden files” in the dialog menu bar.
If a popup appears, select “Trust Project”.
Open Settings → Project: python → Python Interpreter. Then select “Add interpreter” → Add Local Interpreter
Chose “System interpreter” and browse to the python executable in “MORe installation directory”\env\python.exe.
From the run configuration drop down select “Edit Configurations”. Then add a new python configuration. Modify the following parameters:
Name: MORe
Python interpreter dropdown: Make sure the environment from the “MORe installation directory”\env is selected.
Script path: select MORe_pycharm.py from “MORe installation directory”\python.
Working directory: select “MORe installation directory”\python
From the “modify options” dropdown, select “Run with Python console”