views:

1316

answers:

6

Does BeautifulSoup work with Python 3?

If not, how soon will there be a port? Will there be a port at all?

Google doesn't turn up anything to me (Maybe it's 'coz I'm looking for the wrong thing?)

+2  A: 

I'm guessing the answer is "No". According to Python.org:

Python 3000 (a.k.a. "Py3k", and released as Python 3.0) is a new version of the language that is incompatible with the 2.x line of releases. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. Also, the standard library has been reorganized in a few prominent places.

A better place for this particular question might be the BeautifulSoup forum.

Huuuze
A: 

I'm wondering the same thing about other python modules I use (like wxPython, Numpy, Matplotlib, etc).

Hopefully following the official Python 3.0 release, we will see updates and ports coming soon.

Corey Goldberg
+1  A: 

IMHO you should give Python 3 some time. It will take a few months at least for maintainers to port their libraries to it, and the transition won't be very quick.

However, the transition isn't supposed to be too difficult, so write in Python 2.5 now and just switch later.

Eli Bendersky
Better to use 2.6 now, I'd say.
recursive
Well, this was posted on 29.09.08...
Eli Bendersky
+1  A: 

There's a release candidate for Python 3.0 available, so you can always test BeautifulSoup's compatibility yourself :)

Matthew Trevor
+2  A: 

About two months after I asked this question, a port has been released:

http://groups.google.com/group/beautifulsoup/browse_thread/thread/f24882cc17a0625e

It'll bet BS working, but that's about it. Not yet tried it though.

Yuvi
A: 

http://www.crummy.com/software/BeautifulSoup/ says:

Download Beautiful Soup

If you're using Python 2.3 through 2.6, the 3.0 series is the best choice. The most recent release in the 3.0 series is 3.0.8, released November 30, 2009.

If you're using Python 3.0, you must use the 3.1 series. Beautiful Soup version 3.1.0.1 was released January 6, 2009. You can use the 3.1 series with earlier versions of Python, but you might run into the problems described here.

Terry Felkrow