Something which doesn't rely on native libraries would be even more better.
+2
A:
twisted has an excellent pure-python implementation, see twisted.names sources (especially dns.py). If you can't use all of their code, maybe you can extract and repurpose their Record_SRV
class from that file.
Alex Martelli
2009-07-27 17:14:00
Went by the first answer posted, though thanks!
Gili Nachum
2009-08-29 21:35:02
Works thanks! import dns.resolveranswers = dns.resolver.query('_xmpp-server._tcp.gmail.com', 'SRV')for rdata in answers: print str(rdata)
Gili Nachum
2009-08-29 21:34:31