Hi,
I'm just blundering into BeautifulSoup -- and Python in general -- to
run Tom Dyson's MySpace parser,
http://www.throwingbeans.org/MySpace.py.txt,
so please forgive my ignorance.
When MySpace.py imports BeautifulSoup.py 3.1.0.1, Python 3.1.1 is
reporting SyntaxErrors.
First I got:
File "C:\Python31\lib\site-packages\BeautifulSoup.py", line 427
raise AttributeError, "'%s' object has no attribute '%s'" %
(self.__class__.__name__, attr)
[pointing at the comma after AttributeError]
SyntaxError: invalid syntax
Putting that string expression inside parens rather than after a comma
seems to make Python happy.
Now I get to:
File "C:\Python31\lib\site-packages\BeautifulSoup.py", line 438
return u'<![CDATA[' + self + u']]>'
[pointing at the single quote after "CDATA[" ]
SyntaxError: invalid syntax
I'm way out of my depth on this one, and don't understand how that's
all supposed to parse out, but Python doesn't like it. Any suggestions?