Main Content

mwpython

Start aPythonsession using aMATLABCompiler SDKPythonpackage onMac OS X

Description

example

mwpython [-verbose] [py_args] [-mlstartupopt[,opt]]python_scriptnameStarts a Python®session that executes a Python script.

mwpython [-verbose] [py_args] [-mlstartupopt[,opt]] -ccmdStarts Python session that executes a Python command.

example

mwpython [-verbose] [py_args] [-mlstartupopt[,opt]] -mmodStarts a Python session that executes a Python module.

Input Arguments

collapse all

Python arguments, specified as a comma-separated list.

MATLAB Runtimestartup options, specified as a comma-separated list.

  • -nojvm— disable the Java®Virtual Machine, which is enabled by default. This can help improve theMATLAB Runtimeperformance.

  • -nodisplay— on Linux®, run theMATLAB Runtimewithout display functionality.

Python script to execute, specified as a character array with a.pyextension.

Python command to execute, specified as a character array.

Python module to execute, specified as a character array.

Note

If you want to use a specific version of Python, set thePYTHONHOMEenvironment variable on your machine to point to the location of your desired Python installation prior to invokingmwpython.

Examples

Execute a Python Script in Verbose Mode

mwpython -verbose myfile.py

Execute a Python Module with Arguments

mwpython -m mymod arg1 arg2

版本历史

Introduced in R2015b