I am trying to write a program to send UDP packets, as in https://wiki.python.org/moin/UdpCommunication The code appears to be in Python 2:
import socket
UDP_I
If you are running python 3 then you need to change the print statements to print functions, i.e. put things in brackets () after print statements.
The only thing that you will see the above do is the prints unless you have something listening on 127.0.0.1 port 5005
as you are sending a packet not receiving it - so you need to implement and start the other part of the example in another console window first so it is waiting for the message.