mwpython

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

Syntax

  • mypython [-verbose] [py_args] [-mlstartup opt[,opt]] scr.py
    example
  • mypython [-verbose] [py_args] [-mlstartup opt[,opt]] -c cmd
  • mypython [-verbose] [py_args] [-mlstartup opt[,opt]] -m mod
    example

Description

example

mypython [-verbose] [py_args] [-mlstartup opt[,opt]] scr.py starts a Python® session that executes a Python script.

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

example

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

Input Arguments

collapse all

py_args — Python arguments

Python arguments, specified as a comma-separated list.

opt[,opt] — MATLAB® Runtime startup options-nojvm | -nodisplay | -logfile

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.

scr.py — Python script to execute

Python script to execute, specified as a string.

cmd — Python command to execute

Python command to execute, specified as a string.

mod — Python module to execute

Python module to execute, specified as a string.

Examples

Execute Python script with in verbose mode

mwpython -verbose myfile.py

Execute Python module with arguments

mwpython -m mymod arg1 arg2

Introduced in R2015b

Was this topic helpful?