I'd like to end a process after certain conditions are met within a script. like this:
import psutil
PROCNAME = "standard.exe"
for proc in psutil.process_iter():
if proc.name() == PROCNAME:
proc.kill()
I can run this standalone script (processkiller.py) in Spyder and it works but I'd would like to run this script from another script, like this:
os.system("C:\\Users\\s086372\\Desktop\\results\ProcessKiller.py")
This doesn't work, any suggestions? I'm still a beginner who is using simple codes to script engineering simulations.
the mdb.jobs.kill(
) within abaqus doesn't work, it's bugging, so I have to manually kill the process in some way.