Closed sebitoelcheater closed 6 years ago
In Matlab exists the Shared Sessions. If there is one shared session running, one should access to it instead of always creating a new one.
Could you be more specific? Why do you say that one should access a shared session? Is there a C API for that?
In my case, I need to access the session that some users are already working on. I can't ask them to stop their work and use a session I will open for them. It's an already implemented functionality in the oficial Matlab API for Python, connect_matlab that receives the name of the shared session that is being tried to access (there is also a way to list all the shared Matlab sessions in a computer). I'm using that, however it would be great to have that implemented on this project.
In my case, I need to access the session that some users are already working on. I can't ask them to stop their work and use the lesson I will open for them. It's an already implemented functionality in the oficial Matlab API for Python, connect_matlan that receives the name of the shared session that is being tried to access (there is also a way to list all the shared Matlab sessions in a computer).
OK, I see. My suggestions are (sorted by "easiness"):
Use the official Python package, if it does what you need.
I've never used the shared sessions, but maybe it's enough to add a command line option when starting MATLAB (?). If that the case then matlab_wrapper.MatlabSession has an argument to pass options when starting a MATLAB process.
If possible, you could also implement this functionality in matlab_wrapper and open a PR.
I don't think it's possible to implement this feature using MATLAB's C API.
In Matlab exists the Shared Sessions. If there is one shared session running, one should access to it instead of always creating a new one.
https://www.mathworks.com/help/matlab/matlab_external/attaching-to-an-existing-matlab-session.html