Skip to content

MPython-Package-Factory/mpython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPython logo.

MPython

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.

Features

  • 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.

Installation

To install the Python package generated by MPython, use the following command:

pip install .

Usage

  1. Compile Matlab Code: Use the mpython_compile function to compile Matlab code into a Python package.
  2. Wrap Matlab Functions: Use the mpython_wrap function to generate Python bindings for Matlab functions and classes.
  3. Call Matlab Functions: Import the generated Python package and call Matlab functions as if they were native Python functions.

Example

from my_matlab_package import my_function

result = my_function(arg1, arg2)
print(result)

License

This project is licensed under the GNU General Public License v2.0.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.

About

Compile and wrap Matlab projects in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published