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.

Installation#

Download the installer from https://www.spyder-ide.org and follow the instructions of the installer.

Integrate MORe#

  1. Start Spyder from the Start Menu

  2. Go to Tools → Preferences → Python interpreter

  3. 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.

    python interpreter selection
  4. Restart the console by clicking the cross next to “Console 1/A”

  5. 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.

    python file open dialog
  6. Run the startup script.

    python file open dialog
  7. 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#

  1. Start PyCharm from the Start Menu

  2. Select “open project”

  3. 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.

    pycharm open project
  4. If a popup appears, select “Trust Project”.

  5. Open Settings → Project: python → Python Interpreter. Then select “Add interpreter” → Add Local Interpreter

    pycharm select interpreter
  6. Chose “System interpreter” and browse to the python executable in “MORe installation directory”\env\python.exe.

    pycharm add system interpreter
  7. As of 11.01.2024, PyCharm versions 2023.3 and newer produce this error message, which is of no consequence.

    pycharm packages not loading

    Afterwards an error popup will show up. Confirm the error with OK and continue with the next step.

    pycharm interpreter error
  8. 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”

    pycharm add run configuration