Restart a function of python program hit error
조회 수: 2 (최근 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!