Re: [Tutor] Checking for custom error codes

2007-08-08 Thread Alan Gauld
"wormwood_3" <[EMAIL PROTECTED]> wrote >def lookup(self): > ... >for potdomain in self.potdomains: >try: >who.whois(potdomain) >self.availdomains.append(potdomain) >except 'NoSuchDomain': >pass > This may, howeve

Re: [Tutor] Checking for custom error codes

2007-08-07 Thread Tiger12506
> This is exactly what I needed, awesome! Looks like this is what you were > saying to do?: > http://docs.python.org/tut/node10.html#SECTION001050 Why ~ exactly! A link tells a thousand words. (Or maybe more.) So does that mean that a link is inherently more valuable than a pictu

Re: [Tutor] Checking for custom error codes

2007-08-07 Thread wormwood_3
> Traceback (most recent call last): > File "domainspotter.py", line 150, in >runMainParser() > File "domainspotter.py", line 147, in runMainParser >td.run() > File "domainspotter.py", line 71, in run >checkdomains.lookup() > File "domainspotter.py", line 108, in lookup >from r

Re: [Tutor] Checking for custom error codes

2007-08-07 Thread Tiger12506
> Traceback (most recent call last): > File "domainspotter.py", line 150, in >runMainParser() > File "domainspotter.py", line 147, in runMainParser >td.run() > File "domainspotter.py", line 71, in run >checkdomains.lookup() > File "domainspotter.py", line 108, in lookup >from r

Re: [Tutor] Checking for custom error codes

2007-08-07 Thread wormwood_3
>>Probably you need to import NoSuchDomain from rwhois: >>from rwhois import WhoisRecord, NoSuchDomain >> >>then use >> except NoSuchDomain: I tried adding: from rwhois import WhoisRecord, NoSuchDomain who = WhoisRecord() self.totalchecked = 0 self.availdomains =

Re: [Tutor] Checking for custom error codes

2007-08-07 Thread wormwood_3
>>Examining rwhois.py reveals >>raise 'NoSuchDomain' >>>which is a string exception. Which should work even tho deprecated. >>>When you say it did not work what is the evidence? -- Bob Gailer 510-978-4454 Oakland, CA 919-636-4239 Chapel Hill, NC ___ I did s

Re: [Tutor] Checking for custom error codes

2007-08-07 Thread Alan Gauld
"wormwood_3" <[EMAIL PROTECTED]> wrote > Recently I was trying to do a "try: X except Y: Z" statement, > checking for a custom error code >for potdomain in self.potdomains: >try: >who.whois(potdomain) >self.availdomains.append(potdomain) >

Re: [Tutor] Checking for custom error codes

2007-08-07 Thread wormwood_3
>>Probably you need to import NoSuchDomain from rwhois: >>from rwhois import WhoisRecord, NoSuchDomain >> >>then use >> except NoSuchDomain: That sounds right, I will give it a shot soon. >>In general, when you ask a question here, "I tried X and it did not >>work" is not very informative and

Re: [Tutor] Checking for custom error codes

2007-08-07 Thread Bob Gailer
wormwood_3 wrote: > Hi all, > > I am new to Python programming and this list, looks like a great place so far! > > Recently I was trying to do a "try: X except Y: Z" statement, checking for a > custom error code that the rwhois.py module throws. Some details on the > exercise and the full code ca

Re: [Tutor] Checking for custom error codes

2007-08-07 Thread Kent Johnson
wormwood_3 wrote: > Hi all, > > I am new to Python programming and this list, looks like a great place so far! > > Recently I was trying to do a "try: X except Y: Z" statement, checking for a > custom error code that the rwhois.py module throws. Some details on the > exercise and the full code

[Tutor] Checking for custom error codes

2007-08-07 Thread wormwood_3
Hi all, I am new to Python programming and this list, looks like a great place so far! Recently I was trying to do a "try: X except Y: Z" statement, checking for a custom error code that the rwhois.py module throws. Some details on the exercise and the full code can be found on this post ( htt

[Tutor] Checking for custom error codes

2007-08-07 Thread wormwood_3
Hi all, I am new to Python programming and this list, looks like a great place so far! Recently I was trying to do a "try: X except Y: Z" statement, checking for a custom error code that the rwhois.py module throws. Some details on the exercise and the full code can be found on this post ( htt