Examples don't work without importing the subclasses of ACUDPPacket
Closed this issue · 3 comments
rpet commented
I had to add this line to my main program in order to import all of the subclasses of ACUDPPacket
:
import acudpclient.packets
Without it, the funtion cls.__subclasses__()
(at packet_base.py:24
) will return an empty array and the library won't be able to identify any packet.
Maybe that import should be done at packet_base.py
or, at least, be shown on the usage examples of the library.
joaoubaldo commented
That's not expected at all. What python version are you using @rpet ?
rpet commented
Python 2.7.13 on Debian 9.13:
$ python --version
Python 2.7.13
I tried that import based on the comments on this thread at Stack Overflow and after checking with the Python debugger that cls.__subclasses__()
was actually returning an empty array.
joaoubaldo commented