This's compiler MATLAB to python
Before install depencies
pip install ply==3.11
After install package
pip install pycmp
Homepage on PYPI - https://pypi.org/project/pycmp/0.1.0/
Base require Python 3.9
or newer
git clone https://github.com/aeroshev/CMP.git | cd cmp
pip install .
$ pycmp -h
usage: pycmp [-h] (-p PATH | -s STRING | -S) [-of OUTPUT_FILE] [-v] [-P PORT] [-H HOST]
Compiler MATLAB code to Python scripts
optional arguments:
-h, --help show this help message and exit
-p PATH, --path PATH path to file
-s STRING, --string STRING
input data from console
-S, --server Run async TCP server
-of OUTPUT_FILE, --output-file OUTPUT_FILE
path to output file
-v, --version show program's version number and exit
-P PORT, --port PORT Port of server
-H HOST, --host HOST Hostname of server
pycmp -S [-H/--host host] [-P/--port port]
Client is available by name tcmp
pip install cmp/helpers/server
$ tcmp -h
usage: tcmp [-h] (-d DATA | -f FILE) [-p PORT] [-a ADDRESS]
TCP client for server MATLAB compiler
optional arguments:
-h, --help show this help message and exit
-d DATA, --data DATA input data for compiler from console
-f FILE, --file FILE input data for compiler from file
-p PORT, --port PORT Port of connection server
-a ADDRESS, --address ADDRESS
Address of connection server
tcmp --data 'a = [1; 2; 3];'
pipenv shell
pipenv install --dev
cd tests
pytest