Re: [Tutor] Question about an example in Python doc

2012-02-10 Thread Hugo Arts
On Fri, Feb 10, 2012 at 3:12 PM, daedae11 wrote: > The example is the third example in (Python2.7's doc)->(Python Library > Reference)->17.2.2. > The code of the example is: > > import socket > > # the public network interface > HOST = socket.gethostbyname(socket.gethostname()) > > # create a raw 

Re: [Tutor] Question about an example in Python doc

2012-02-10 Thread Walter Prins
Hi, On 10 February 2012 14:12, daedae11 wrote: > Traceback (most recent call last): >   File "E:\c language\Eclipse\example\src\sniffer.py", line 12, in  > s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP) >   File "D:\Python27\lib\socket.py", line 187, in __init__ > _

[Tutor] Question about an example in Python doc

2012-02-10 Thread daedae11
The example is the third example in (Python2.7's doc)->(Python Library Reference)->17.2.2. The code of the example is: import socket # the public network interface HOST = socket.gethostbyname(socket.gethostname()) # create a raw socket and bind it to the public interface s = socket.socket(socke