Hi! I'm running a Python code that opens Stata and runs a do-file. After the do-file is run I would like to continue with my Python code and for that I would like to add at the end of the do-file, a line that closes Stata. That's because the way I came up to continue running my Python code after the do-file is run is to check whtehter Stata is a process on Windows or not. As I cannot manage to close and exit Stata, Python checks whther Stata is a process and the answer is still yes.

I hope I've been clear with the explanation of my problem. Thanks