Are you sure you want to automate this?
There's a reason your milling software doesn't automatically do a reset and continue when there is a fault. It is dangerous! Without special sensors, you cannot write a program that knows when it is safe to reset and continue after a fault. A human operator will look at the mill and maybe issue a warning before continuing.
Your posts are kind of vague. It's unlikely someone reading this post has your milling software, so a good description will improve your chances at getting an answer.
What does this mean?
Quote: It does throw and error code but with the system check.
How would your python program know if the error code goes away? What does the milling software do to notify the user that there is a fault condition stopping the mill?