Restart a function of python program hit error
1 次查看(过去 30 天)
显示 更早的评论
So my code will generate a python file based on an input and then run the python file. the python program will do its stuff and created a data file for the function to access. Then function return the data inside.
However testing like all the possible generation for the python file takes a long time and I need some data. So I'm wondering what I can do which would basically be if hit an error it will cause the function to just redo with new inputs.
So in my main I'll call run_python(input) in a loop for like X runs and in run_python all that stuff above happens. If something goes wrong with the python script that's kicked off in run_python I want my program to continue running and redo the run_python with a newly generated input.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call Python from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!