Re: [Tutor] Extracting comments from a file

2010-02-22 Thread Kent Johnson
On Mon, Feb 22, 2010 at 1:06 AM, Lao Mao wrote: > Hi, > > I have an html file, with xml style comments in: > > > > I'd like to extract only the comments.  My sense of smell suggests that > there's probably a library (maybe an xml library) that does this already. Take a look at BeautifulSoup: htt

[Tutor] Extracting comments from a file

2010-02-21 Thread Lao Mao
Hi, I have an html file, with xml style comments in: I'd like to extract only the comments. My sense of smell suggests that there's probably a library (maybe an xml library) that does this already. Otherwise, my current alogorithm looks a bit like this: * Iterate over file * If current line c