On 26/03/13 23:15, Dave Angel wrote:
<cut>
Traceback (most recent call last):
File "socket2.py", line 6, in <module>
import socket #for sockets
File "/home/phil/Python/socket.py", line 7, in <module>
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
AttributeError: 'module' object has no attribute 'AF_INET'
Looks to me like you have your own file socket.py in /home/phil/Python
Thanks Dave,
I woke up during the early hours of the morning and realised what was
going on. The name of my python file was not the same as the module but
it was prefixed "socket" and than seems to be enough to cause a problem.
The udp client still doesn't do what I want but at least the example
runs without an error.
--
Regards,
Phil
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor