Thanks a lot, guys. psutil is looking amazing so far.
I mean, how cool is this?
# Kill children of process id 1234
import psutil
for child in psutil.Process(1234).children():
child.kill()
For polling, I’m thinking something like this will suffice.
psutil.Process(1234).wait()
sys.exit()
On windows its a heavy handed operation to get a parent process id
I did find a pretty straightforward way to do this:
import os
os.getpid()
Until a better solution pops up, this fits the bill I think.
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCGn0MFu1zvvqJLuuAVOv9e8ZP%2BXmHWJos8s9NfYgp08g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.