Hacker News new | ask | show | jobs
by brimworks 3803 days ago
uuid.get_node(): ...and which iface's address will I get if I'm on a multi-interface machine (not to mention that it was added in 2.5 version of Python)?

netifaces: ...would require me to build a C extension which would mean going down the rabbit hole of building and bundling python and this library.

2 comments

As opposed to shipping LUA with C extensions? Also, there are things like shedskin: https://github.com/shedskin/shedskin - you don't even have to ship python. Or micropython: https://github.com/micropython/micropython with the code embedded. Then you can easily either shell out or include any C extensions you want.
I just tried it (it was uuid.getnode(), without underscore) and I got the interface with default gateway set.