Parsing Baseball Stats

Anthra Norell anthra.norell at tiscalinet.ch
Tue Jul 25 17:04:45 EDT 2006


----- Original Message -----
From: "Paul McGuire" <ptmcg at austin.rr._bogus_.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Tuesday, July 25, 2006 7:48 PM
Subject: Re: Parsing Baseball Stats


> "Anthra Norell" <anthra.norell at tiscalinet.ch> wrote in message
> news:mailman.8518.1153826522.27775.python-list at python.org...
> > Hi,
> >
> >       Below your solution ready to run. Put get_statistics () in a loop
> that feeds it the names from your file, makes an ouput file
> > name from it and passes both 'statistics' and the ouput file name to
> file_statistics ().
> >
> > Cheers,
> >
> > Frederic
> >
> What Perlish line noise is this?
>
>     Tag_Stripper = SE.SE('"~<.*?>~= " "~<[^>]*~=" "~[^<]*>~=" ')
>
> A pyparsing version certainly wont fit in two lines, but at least I'll still
> respect myself in the morning, *and* 6 months from now...  (Unfortunately,
> I'm loath to post the pyparsing program, given the target site's TOS -
> sorry.)
>
> -- Paul

Paul,

I think self-respect is a very essential attitude and I am pleased to know that you value it as much as I do.
      The off topic thus dispatched, let me first express my appreciation or your interest. Next I agree to anything you say about
pyparsing, because I know little about it. Perhaps you will agree that parsing is overkill if you don't need to. Correct me if I'm
wrong, but I have a hunch that HTM tags don't nest. So you can actually strip them with two or three lines of plain python code,
looking at the letters one by one.
      As to my proposal I can only invite you to run my program first and then pass judgment, unlike the clerical Authorities in the
story who steadfastly refused to take a peek through Galileo's telescope, arguing that, since planets didn't have rings, taking a
peek was an exercise of utter futility.
      And do tell me what a TOS is. If I am missing a point it is rather this one. Does it have to do with copyright? How would it
be then if you did your pyparsing demo on a site with a more accommodating TOS?

Regards

Frederic





More information about the Python-list mailing list