nickovs / slimDNS

Simple, Lightweight Implementation of Multicast DNS
Apache License 2.0
86 stars 9 forks source link

Fixed error on Python3 #7

Open dhanar10 opened 4 years ago

dhanar10 commented 4 years ago

I know that in nickovs/slimDNS#4 and nickovs/slimDNS#5 this proposal by @nevercast has been rejected because we want as small footprint as possible for MicroPython.

However, my use case is to use this as lightweight replacement for avahi-daemon in Raspbian on Raspberry Pi.

This library can also be potentially useful for enhancing https://github.com/dapperfu/python_mDNServer so that it does not depend on avahi-daemon anymore.

I guess I will just leave this pull request here for anyone who is interested.

nickovs commented 4 years ago

Thanks for that. It seems that there is interest in supporting CPython so I'm happy to consider this. Let me run some tests on MicroPython to see how much difference it makes to the bytecode size in practice.

dhanar10 commented 4 years ago

I have separated the command line wrapper and I have tested that the fix for unicast reply is working correctly. Do you have any other input on this pull request?

dhanar10 commented 4 years ago

On second thought, does it really make sense from your point of view to accept this pull request if it contains the command line wrapper? If not, as long as the fix for python 3 & the unicast reply is accepted, I can just revert the command line wrapper and create my own project which depend on this project and contains the command line wrapper only.

nickovs commented 4 years ago

I think that the command line wrapper in a separate file is just fine here. When used in a MicroPython setting it will typically get copied onto the microcontroller manually anyway.