Add the possibility to keep the MATLAB shared session even if the Python process exits

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
matlab, python
Domain
tooling

Research direction

Start with the shared-session cleanup behavior in src/matlab/engine/matlabengine.py at the linked line, then trace how the Python process currently stops MATLAB. Define the flag's lifecycle semantics for multiple Python scripts and verify that a build can reuse one shared session and close it explicitly at the end.

Written by the indexing model from the issue text.

Description

As I understand, once the Python process which connects to the remote session exits, it will also stop the shared session in MATLAB (as seen here). I'm wondering if it would be possible to add a flag allowing us to reuse the shared session between multiple Python scripts?
To give a context, I generate multiple files with MATLAB during the build of a project, and starting/stopping MATLAB for each file is time consuming. The idea here would be to open a shared session at the beginning of the build, generate the files (when required) with MATLAB using this shared session, and close MATLAB at the end.

Dominant language
Python
Stars
97
Forks
13
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mathworks/matlab-engine-for-python

All issues in mathworks/matlab-engine-for-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.