mrkrd / matlab_wrapper

Easy to use MATLAB wrapper for Python
GNU General Public License v3.0
78 stars 23 forks source link

how to close a session? #10

Closed huguesfontenelle closed 9 years ago

huguesfontenelle commented 9 years ago
matlab = matlab_wrapper.MatlabSession(
                options='-nojvm',
                buffer_size=1000,
            )
matlab.put('x', 4.6)
matlab.eval('y=4*x')
y=matlab.get('y')

How do I then close the session? Something like:

matlab.close()

would be useful.

I tried options='-nojvm -nodesktop -nodisplay -nosplash' which is "quieter" but the Matlab process still exist. I could try to kill it, but surely there is a better way?

mrkrd commented 9 years ago

You can try:

del matlab

huguesfontenelle commented 9 years ago

That works, thanks.