Windows: Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import os >>> os.fork Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> os.fork AttributeError: 'module' object has no attribute 'fork'
Linux: $ python Python 2.7.8 (default, Jul 4 2014, 13:08:34) [GCC 4.9.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.fork <built-in function fork> >>>
os.fork 不要在windows系统上用