我有一个django应用程序,它有自己的模型和视图。当我用python manage.py runserver
启动django服务器时,我想打开一个matlab实例,在那里预加载环境,并将这个实例发送给每个请求。我该怎么做?
您可以假设我有一个用于python的matlab包装器:
class MatlabWrapper(object):
def __init__(self):
...
def run(self):
...
def execute(self, cmd):
...
def exit(self):
...
# usage
m = MatlabWrapper()
m.run() # launch matlab
m.execute(cmd1) # execute command 1
m.execute(cmd2) # execute command 2
目前没有回答
相关问题 更多 >
编程相关推荐