On 18/11/2011 15:48, Junfeng Hu wrote:
Thanks
Yes, I had tried this before, so you could find that I comment the line
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
Here is the results.
D:\Python test>mythread2.py
Traceback (most recent call last):
   File "<string>", line 1, in<module>
   File "C:\Python27\lib\multiprocessing\forking.py", line 347, in main
     self = load(from_parent)
   File "C:\Python27\lib\pickle.py", line 1378, in load
     return Unpickler(file).load()
   File "C:\Python27\lib\pickle.py", line 858, in load
     dispatch[key](self)
   File "C:\Python27\lib\pickle.py", line 1133, in load_reduce
     value = func(*args)
   File "C:\Python27\lib\multiprocessing\reduction.py", line 167, in 
rebuild_sock
et
     _sock = fromfd(fd, family, type_, proto)
   File "C:\Python27\lib\multiprocessing\reduction.py", line 156, in fromfd
     s = socket.fromfd(fd, family, type_, proto)
AttributeError: 'module' object has no attribute 'fromfd'

The documentation for socket.fromfd says:

    Availability: Unix.

You're using Microsoft Windows.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to