getting ProcessId within Python code
<p>I am in Windows and Suppose I have a main python code that calls python interpreter in command line to execute another python script ,say test.py .</p>

<p>So test.py is executed as a new process.How can I find the processId for this porcess in Python ?</p>

<p><strong>Update:</strong></p>

<p>To be more specific , we have os.getpid() in os module.It returns the current process id.</p>

<p>If I have a main program that runs Python interpreter to run another script , how can I get the process Id for that executing script ?</p>
