How to get the current process id with python on windows?
there are this function os.geteuid() but its only works with linux/unix could someone tell what it the pythonic way to get the current process id on windows.
1 Answer
Do you really want the process ID? Then the answer is this:
>>> import os
>>> os.getpid()
5328on either Windows or Unix (documentation of os.getpid).
os.geteuid() doesn't get the process ID, which makes me wonder whether you're really asking a different question...?