[Tutor] Help me Be Pythonic
Alexandre Ratti
alex@gabuzomeu.net
Wed, 29 May 2002 11:04:26 +0200
At 21:45 28/05/2002 -0400, you wrote:
>From: "Chris Lott" <chrisl@frodo.thethirdsector.com>
>Date: Tue, 28 May 2002 16:38:00 -0800
>Subject: [Tutor] Help me Be Pythonic
>I have started to learn Python and written my first little app
>that takes a file of names (or a list on the command line) and
>checks to see which of the .com/.org/.net/.info domains are
>available using urllib to grab data from web forms.
>In pseudo code, how can I think about this task like a python
>programmer. Would I have a urlcheck object that was passed the
>data and checked for different types?
I would use a URLChecker class that is passed data. You might pass it a
name and a list of types to check. I would probably use two classes: a
Checker (that carries out the actual checks) and a CheckerApp (that drives
checks using the first class and print out results).
Cheers.
Alexandre