Auto restart program

I have a simple .py program which extracts data from public API of a established platform. I save output for each iteration/request. For multiple reasons, it may fail. When it does, I restart the program and it picks up from where it left.

I would like the program to auto-restart, within PyCharm, without me having to click on the RUN button. Any pointers?

Here is a solution from SO which needs terminal.

Thanks.

 

0
1 comment

There's no feature in PyCharm to automatically re-run scripts. The best approach is to solve the problem with code. 

SO solution seems like it should work. You could add a sleep statement to avoid any possible race conditions.

0

Please sign in to leave a comment.