Restart a function of python program hit error

1 回表示 (過去 30 日間)
Zehao Pan
Zehao Pan 2019 年 4 月 29 日
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 件)

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by