I started this for any information on new python modules apart from standard library. Many people (Including me), aren't willing to move into p3k due to lack of external/non-standard modules.

So I started this to keep ourselves informed on New Python 3 Modules.
No Limitation, ANY PYTHON 3 MODULE

Recommended Answers

All 21 Replies

Like I mentioned in another thread, the problem is that a lot of those modules are freeware done by different folks. Monetary reward is more of a driving force, and it will take a while to get those free things to show up. Python30 has a lot of rather subtle changes that need to be considered to avoid buggy code.

Well i know this may be obvious, but Tkinter is all ready to be used in python 3. So anybody who uses that GUI toolkit will still be able to use it in python 30.

Well i know this may be obvious, but Tkinter is all ready to be used in python 3. So anybody who uses that GUI toolkit will still be able to use it in python 30.

Tkinter ships with the Python30, it better work! Also Tkinter uses its own language called TCL, so changes would have been minor.

Anyway evstevemd, a good idea to keep an eye out for some of those popular open-source modules to appear.

Like I mentioned in another thread, the problem is that a lot of those modules are freeware done by different folks. Monetary reward is more of a driving force, and it will take a while to get those free things to show up. Python30 has a lot of rather subtle changes that need to be considered to avoid buggy code.

Yeah, I understand!
I wanted us to keep each other updated in case any module comes for python 3

commented: Good idea! +6

Yeah, I understand!
I wanted us to keep each other updated in case any module comes for python 3

Nice idea! Will keep checking it for the next year or so.

Cython, for writing extension modules works with Python 3. One of the great things about it is that extension modules you write with it work for both Python 2.x and Python 3.x most of the time, without adjustment.

SQLite is also packaged with Python 3.x. PostgreSQL has pg8000-py3. Don't know about MySQL or any of the others.

Well i think i can post the first one. Beautiful Soup!
http://www.crummy.com/software/BeautifulSoup/

All you need to do is an automatic python 3 conversion on it and then it works fine with python 3. So enjoy :)

This will not work! Python30 does not have a module called 'sgmllib'. The error is:
Traceback (most recent call last):
File "<string>", line 248, in run_nodebug
File "C:\Python30\Atest30\Bull\BS_ParseHtml1.py", line 4, in <module>
from BeautifulSoup import BeautifulSoup
File "C:\Python30\Atest30\Bull\BeautifulSoup.py", line 54, in <module>
from sgmllib import SGMLParser, SGMLParseError
ImportError: No module named sgmllib

Well it must somehow, the site says it does and im sure they wouldnt say that without some foundation at least.

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

Beautiful Soup is known to work with Python versions 2.4, 2.5, and (after an automatic conversion) 3.0. Currently the 3.0.x series is better at parsing bad HTML than the 3.1 series.

from: http://www.crummy.com/software/BeautifulSoup/3.1-problems.html

In Python 3.0, the latest version of Python, SGMLParser has been removed. The only parser that's part of the Python 3.0 standard library is HTMLParser, a simpler parser that's much worse at processing malformed HTML.

In the meantime, an excellent new HTML parsing library called html5lib has emerged. It's very good at processing malformed HTML, but it's not part of the Python standard library, and at the moment it's slower than either SGMLParser or HTMLParser.

I no longer enjoy working on Beautiful Soup, but too many people depend on it for me to let the project die just because it depends on code that's been removed from the Python standard library. So I wrote Beautiful Soup 3.1.0, which cleans up the Python 2.x code so that it can be automatically converted to Python 3.0. code. Part of this change was to switch the underlying parser from SGMLParser to HTMLParser. The errors you're seeing are caused by HTML that SGMLParser could handle but HTMLParser can't.

When Beautiful Soup was first released in May of 2004, there were no lenient HTML parsers that were easy to program, only the ones embedded in web browsers. Now there are lots of programmable lenient HTML parsers, and most of them are better than SGMLParser, let alone HTMLParser. These days, Beautiful Soup is useful for its Unicode handling and its tree-traversal methods. Parsing is longer a competitive advantage for Beautiful Soup, and I'd be happier if I could get out of the parser business altogether.

What I gather from this is that the author of the library no longer wants to continue develop BeautifulSoup, and since python 3 it's become worse at parsing real world html (malformed html). Even if the code can be converted into working python 3 code, it's probably a good idea to start looking for other parsers.

I've found a couple of blogs that points to lxml as the parser of choice. Take a look at http://blog.ianbicking.org/2008/03/30/python-html-parser-performance/

-Vidaj-

BeautifulSoup works fine with Python30 if you
copy
BeautifulSoup.py (version3.0.7a or lower)
and
sgmllib.py (find it typically in C:\Python25\Lib)
to a separate directory and convert both programs with 2to3.py

This rather obvious approach was overlooked by the BeautifulSoup folks.

wxPython isn't yet out and I asked on the mail list, there is no nearby plan to port it to 3k. So Stick with your python 2.x version.

I also hope haven't missed any module apart from mentioned above

BeautifulSoup 4.1.3 is out since August 20, 2012. It is compatible with python 2.6+ and python 3 !

Don't forget that the Python 3.3 release date is September 22, 2012
Some of the modules listed at the gohlke site are for Python 3.3

I have played around with the prerelease version, there are some improvements, but also some bugs.

A new module python-future is available to help build code cross compatible between python 2 and 3, and for code conversion. Check it !

Work on porting the wxPython GUI toolkit to Python3 is progressing steadily. The project is called Pheonix, here is an example with download info ...

''' pwx_Notebook_simple1.py
experiments with wxPython's wx.Notebook() widget
wx.Notebook(parent, id, pos, size, style, name)

tab position style=wx.NB_TOP is default
others are wx.NB_BOTTOM, wx.NB_LEFT or wx.NB_RIGHT

For Python33 on Windows downloaded the most recent
wxPython_Phoenix-3.0.0.0-r75143-win32-py3.3.tar.gz
from
http://wxpython.org/Phoenix/snapshot-builds/
then simply extracted the wx folder to
C:\Python33\Lib\site-packages

Note:
tar.gz also available for Linux versions
recently updated documents are there too
wxPython_Phoenix-3.0.0.0-r75068-docs.tar.gz
'''

import wx

class MyPanel(wx.Panel):
    """
    each panel instance gives the notbook page content and colour
    """
    def __init__(self, parent, bgcolor, toolbar=False):
        wx.Panel.__init__(self, parent, wx.ID_ANY)
        self.SetBackgroundColour(bgcolor)


app = wx.App(0)

# create an instance of a frame, parent is None
caption = "testing simple wx.Notebook()"
frame = wx.Frame(None, -1, caption, size=(400,300))

# create an instance of a notebook, parent=frame
notebook = wx.Notebook(frame, -1)

# each panel instance has parent=notebook and gives the page color
panel1 = MyPanel(notebook, "yellow")
panel2 = MyPanel(notebook, "green")
panel3 = MyPanel(notebook, "red")

# now create the notebook pages, add the tab title to each page
notebook.AddPage(panel1, "Page1")
notebook.AddPage(panel2, "Page2")
notebook.AddPage(panel3, "Page3")

# add a label to each of the panels (pages)
# the label will try to autosize to fit text
text1 = "What time does the two o'clock bus leave?"
wx.StaticText(panel1, wx.ID_ANY, text1)
text2 = "He is not 'BALDING' - He is in 'FOLLICLE REGRESSION'."
wx.StaticText(panel2, wx.ID_ANY, text2)
text3 = "She does not 'NAG' - She becomes 'VERBALLY REPETITIVE'."
wx.StaticText(panel3, wx.ID_ANY, text3)

frame.Show(True)
app.MainLoop()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.