[Twisted-Python] Twisted.Names assistance with auth and additional sections
Sean Leach
kickdaddy at gmail.com
Wed Mar 21 06:31:08 MDT 2007
Yes - I know, this was a small example program to show the problem I
was seeing. And I have read over all of the documentation, including
the Twisted.names source.
On 3/21/07, Thomas Hervé <therve at free.fr> wrote:
> Quoting Sean Leach <kickdaddy at gmail.com>:
>
> > Ok...ignore my last post, jumped the gun, the additional and authority
> > still don't exist in the result object. In addition, I tried your
> > example to make sure I wasn't crazy, and it doesn't return any result
> > data. I know it's not a network issue or anything silly as I can
> > query a.root fine with dig and get the results. Here is the session:
> >
> > $ cat test.py
> > #!/usr/bin/python2.4
> > import time
> > from twisted.names import dns, client, _version
> > print _version.version
> > def errorHandler(error):
> > print str(error)
> > r = client.Resolver(servers=[('198.41.0.4', 53)])
> > d = r.queryUDP([dns.Query('google.com', dns.IN,
> > dns.A)]).addErrback(errorHandler)
> > time.sleep(5) ## give it a time for shitz and giggles
> > print d
> > print d.result
>
> I *think* you're missing something about Twisted. You should start the reactor
> to have something, and *never* use time.sleep inside a Twisted program.
>
> You could start with reading the documentation here:
> http://twistedmatrix.com/projects/core/documentation/howto/async.html.
>
> --
> Thomas
>
>
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
More information about the Twisted-Python
mailing list