Re: [Tutor] advise on using re

2009-02-15 Thread Kent Johnson
On Sun, Feb 15, 2009 at 5:53 AM, Norman Khine wrote: MXlocate = re.compile('^.*preference = (\d*).*exchanger = (.*)$', > On the shell, the command > > $ nslookup -querytype=MX abakuc.com > Server: 193.252.19.3 > Address:193.252.19.3#53 > > Non-authoritative answer: > abakuc.c

[Tutor] advise on using re

2009-02-15 Thread Norman Khine
Hello, What am I doing wrong here. >>> import smtplib, socket, re, os, operator, sys >>> domain = 'abakuc.com' >>> validMXservers = [] >>> MXlocate = re.compile('^.*preference = (\d*).*exchanger = (.*)$', re.IGNORECASE) >>> MXservers = os.popen('nslookup -querytype=MX %s' %domain, 'r') >>> for