I'm having a really strange issue where my queries are returning objects
of different types depending on whether my script is run via the Python
interpreter or compiled via py2exe. I was just curious if this was a
known issue or if I'm making some obvious dumb mistake...
# dnstest.py
import dns.resolver
resolver = dns.resolver.Resolver()
answers = resolver.query('fandotech.com', 'MX')
for rdata in answers:
print type(rdata)
print rdata.to_text()
# setup-dnstest.py
from distutils.core import setup
import py2exe, sys, os
sys.argv.append('py2exe')
setup(
options = {'py2exe': {'bundle_files': 1}},
console = ["dnstest.py"],
zipfile = None,
)
When running the script normally with the Python interpreter, rdata is
of type dns.rdtypes.ANY.MX.MX.
I:\>dnstest.py
<class 'dns.rdtypes.ANY.MX.MX'>
10 ftdcex1.fandotech.com.
But when I compile it with py2exe and run the resulting executable,
rdata is of type dns.rdata.GenericRdata, and the to_text() method
doesn't return anything resembling a resource record.
I:\>dnstest.exe
<class 'dns.rdata.GenericRdata'>
\# 12 000a0766746463657831c00c
--
Michael Conigliaro
Computer Analyst
Fuss & O'Neill Technologies
www.fandotech.com
_______________________________________________
dnspython-users mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-users