MPython is a framework that provides Python bindings for Matlab functions and classes. It enables seamless integration between Python and Matlab, allowing users to call Matlab functions and manipulate Matlab objects directly from Python.
- Matlab Function Wrapping: Automatically wraps Matlab functions for use in Python.
- Matlab Class Wrapping: Provides Python bindings for Matlab classes.
- Data Conversion: Handles conversion between Matlab and Python data types.
- Customizable Templates: Allows users to define custom templates for function and class wrapping.
To install the Python package generated by MPython, use the following command:
pip install .
- Compile Matlab Code: Use the
mpython_compile
function to compile Matlab code into a Python package. - Wrap Matlab Functions: Use the
mpython_wrap
function to generate Python bindings for Matlab functions and classes. - Call Matlab Functions: Import the generated Python package and call Matlab functions as if they were native Python functions.
from my_matlab_package import my_function
result = my_function(arg1, arg2)
print(result)
This project is licensed under the GNU General Public License v2.0.
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.