bastibe / transplant

Transplant is an easy way of calling Matlab from Python
https://transplant.readthedocs.io
Other
110 stars 26 forks source link

Quitting Matlab connection #24

Closed tsdev closed 7 years ago

tsdev commented 7 years ago

At present the .close method closes the connection to Matlab. The problem is that this hides the Matlab command with the same name that closes figures (although the alternative matlab.delete(handle) can be still used of course). Also this allows to call matlab.quit() and matlab.exit(), which hangs transplant (probably by closing Matlab but without Transplant registering it). Would it be possible to change the Transplant .close method name to exit() and use quit() as alias? I understand this would break compatibility with older versions though.

bastibe commented 7 years ago

Very good point! I'll look into that.

bastibe commented 7 years ago

The latest revision changes close to exit, which should fix your issue. I have not overloaded quit, since it provides additional arguments that I can not reproduce in Transplant.

tsdev commented 7 years ago

Works fine! Thank you!