Documentation

mwpython

Start a Python session using a MATLAB Compiler SDK Python package on Mac OS X

Syntax

mwpython [-verbose] [py_args] [-mlstartup opt[,opt]] python_scriptname
mwpython [-verbose] [py_args] [-mlstartup opt[,opt]] -c cmd
mwpython [-verbose] [py_args] [-mlstartup opt[,opt]] -m mod

Description

example

mwpython [-verbose] [py_args] [-mlstartup opt[,opt]] python_scriptname Starts a Python® session that executes a Python script.

mwpython [-verbose] [py_args] [-mlstartup opt[,opt]] -c cmd Starts Python session that executes a Python command.

example

mwpython [-verbose] [py_args] [-mlstartup opt[,opt]] -m mod Starts a Python session that executes a Python module.

Input Arguments

collapse all

Python arguments, specified as a comma-separated list.

MATLAB Runtime startup options, specified as a comma-separated list.

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

  • -nodisplay — on Linux®, run the MATLAB Runtime without display functionality.

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

Python command to execute, specified as a character array.

Python module to execute, specified as a character array.

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