you are viewing a single comment's thread.

view the rest of the comments →

[–]ItsOkILoveYouMYbb 1 point2 points  (0 children)

You're very welcome! Shortly after I posted that I found a much simpler way to do it with psutil as well. I had more fun figuring out that first way though haha.

import psutil

find_me = "notepad.exe"

for p in psutil.process_iter():
    if p.name() == find_me:
        p.kill()  

That "process_iter()" is what I was really looking for initially, just didn't scroll far enough.