Omitting socket.IPPROTO_UDP works, thanks.
By the way, I am also packing my data in a struct for sending in the datagram. The import of the
struct module does not follow
this convention:
The modules are available by their u-name, and also by their non-u-name. The non-u-name can be overridden by a file of that name in your package path. For example, import json will first search for a file json.py or directory json and load that package if it is found. If nothing is found, it will fallback to loading the built-in ujson module.
However:
Code: Select all
>>> import struct
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'struct'
>>> import ustruct
>>>