Commit e683ef55 authored by Georg Brandl's avatar Georg Brandl

Make call of os.getppid() conditional: it is not available on Windows.

parent 1014686d
......@@ -81,7 +81,8 @@ To show the individual process IDs involved, here is an expanded example::
def info(title):
print title
print 'module name:', __name__
print 'parent process:', os.getppid()
if hasattr(os, 'getppid'): # only available on Unix
print 'parent process:', os.getppid()
print 'process id:', os.getpid()
def f(name):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment