Issue #25169: os.getppid() is available on Windows since Python 3.2.

Patch by Bar Harel.
This commit is contained in:
Berker Peksag 2015-09-21 06:13:36 +03:00
commit ad8dcb703e
1 changed files with 1 additions and 2 deletions

View File

@ -65,8 +65,7 @@ To show the individual process IDs involved, here is an expanded example::
def info(title):
print(title)
print('module name:', __name__)
if hasattr(os, 'getppid'): # only available on Unix
print('parent process:', os.getppid())
print('parent process:', os.getppid())
print('process id:', os.getpid())
def f(name):