On 12/07/16 15:32, ammar jallawi wrote:

> # Simple TCP client and server that send and receive 16 octets
> import socket, sys
> s = socket.socket(socket.AF_BLUETOOTH, socket.SO_REUSEADDR, 
> socket.BTPROTO_RFCOMM)
> 


> and getting this error:
> 
> AttributeError: 'module' object has no attribute 'AF_BLUETOOTH'
> 
> 
> Is the AF_BLUETOOTH supported in windows? if not what I need to do? thanks

Please always include the full error text not just the last line summary.

In this case it was fairly easy to find the error source but if it had
been further down or had multiple references it would have been harder.

As to the error what makes you think AF_BLUETOOTH is a valid protocol?
There is no mention of it in the module documentation for Python v2.7
(which is what you appear to be targeting).

It does appear from v3.3 so you need to target that version
(or later) of Python.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to