views:

22

answers:

1

Could someone tell/show how to get the current proccess 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 proccess id on windows.

+2  A: 

Do you really want the process ID? Then the answer is this:

>>> import os
>>> os.getpid()
5328

on either Windows or Unix.

os.geteuid() doesn't get the process ID, which makes me wonder whether you're really asking a different question...?

RichieHindle