Created
June 10, 2015 19:29
-
-
Save markuman/7198f58bb9ad491d02ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Jun 10 20:42:05 2015 | |
@author: markus | |
""" | |
import matlab.engine | |
DEFAULT_WORKER = 1 | |
## MATLAB PYTHON ENGINE IS NOT THREAD SAFE!! | |
def workerSetup(num=DEFAULT_WORKER): | |
worker = [] | |
for n in range(0, num): | |
worker.append(matlab.engine.start_matlab()) | |
return worker | |
m = workerSetup() | |
test = m[0].ver() | |
print(test) | |
m[0].quit() | |
print(m) | |
print(m[0]) | |
## MAIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment