How can I use Python with Compose?

You can trigger the Python environment, such as the Python Editor and Command Window, in the following ways:

  1. Define a user profile: On the main toolbar, select the Python user profile, which sets all corresponding browsers to Python. You can also set Python to be your default language.
  2. Open a new Python file: Select File > New > Python File. The new file sets the respective command window and editor for Python.
  3. Open an existing Python file, which sets the respective command window and editor for Python.

What Python version is shipped with Compose?

Python 3.8

How do I install a new Python Package

Use the OML function installpythonpackage<package_name> or use the command prompt:

  1. Open the command window (cmd) as Administrator.
  2. Type: cd C:\<Compose_installation_folder>\common\python\python<version>\win64
  3. Type: python.exe-m pip install <package_name>

Can I run OML and Python together?

Yes, you can run OML and Python using the following functions:

Use this function: To do this:
exporttopython Pass variables from OML to Python
getpythonvar Pass variables from Python to OML
evalpythonfunction Evaluate Python statements or files in the middle of the OML script.

Can I import and use my own Python distribution in Compose?

No. All Altair products that support Python use the same Python binaries of a particular version, therefore using a different distribution affects not only Compose, but other Altair products too.

What are the benefits of Compose for an advanced Python user?

On top of the complete and Integrated Development Environment (IDE) provided in Compose, you can mix your Python scripts with OML and create a toolchain that has all-in-one features in a single environment instead of using separate applications, such as another Python IDE and Octave.

How can I check the Python packages that are installed?

Use the help('modules') statement in the Python command window or view the Python Library Browser.