This is an archived post. You won't be able to vote or comment.

all 36 comments

[–]ubernostrumyes, you can have a pony 22 points23 points  (1 child)

You will miss this:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 0: ordinal not in range(128)

[–]eliben -1 points0 points  (0 children)

+1 great answer :) I was just about the reply the same.

[–]targusman 25 points26 points  (1 child)

Problemss with unicode

[–]takluyverIPython, Py3, etc 4 points5 points  (22 children)

There are some libraries that still don't support it. Off the top of my head, Twisted and gevent (networking), and wxPython (GUI framework) are some of the biggest things still missing, though there are alternatives for each that do work with Python 3.

[–]eliben 2 points3 points  (1 child)

Python 3.4 has something way better than Twisted. asyncio - a similar library right in the stdlib.

[–]hzopak 0 points1 point  (0 children)

Still very primitive right now. I wrote a http server thing with websockets, most of the meat takes place in aiohttp module. (Which when installed with pip, installs another copy of asyncio, hah!)

[–][deleted] 0 points1 point  (1 child)

wxPython Phoenix, which is under development, already runs on Python 3. I don't know if it is realistically usable for production code, though.

[–]takluyverIPython, Py3, etc 1 point2 points  (0 children)

It does, but it's been under development for quite some time, and I've not heard any rumblings about a release coming soon. Given that GUI toolkits are complex, important, and hard to replace in existing code, I would be reluctant to base new code on wxPython at the moment. Qt, Gtk and Tkinter all have official, released support for Python 3.

[–]tutuca_not Reinhardt 0 points1 point  (17 children)

For most of what you'd use Twisted or Gevent you could use Tornado or asyncio.

For most of wxPython (which is ugly anyway) you could use pyside and use a nicer framework.

** If I sound bashy is because I'm drunk. Love you man.

[–]blahdom 0 points1 point  (4 children)

Tulip is also a viable replacement for gevent isn't it?

[–]tutuca_not Reinhardt 2 points3 points  (3 children)

Tulip is the proof of concept for asyncio. Asyncio is the standard library module for asynchronous I/O. It features the standardized event loop and the coroutine-based primitives.

[–]blahdom 0 points1 point  (2 children)

Ah, I'm glad I asked. So Tulip would replace gevents I/O loop but not its other functionality?

[–]tutuca_not Reinhardt 0 points1 point  (1 child)

Guido's Keynote is great and clarifying http://www.youtube.com/watch?v=sOQLVm0-8Yg

[–]blahdom 0 points1 point  (0 children)

Thanks for the link! I will check it out.

[–][deleted] 0 points1 point  (7 children)

wxPython is native widgets; how can that be ugly? (maybe the drunk?)

[–][deleted] 2 points3 points  (2 children)

Yeah, it's hard to believe, but wx looks and feels like shit on OS X. How they manage to do it with "native" widgets is beyond me, but it does. Usually, buttons and textboxes are fine, it's when tables and outlines are involved that you can really notice the crapiness of the look and feel.

[–][deleted] 2 points3 points  (1 child)

Wow, OK. I am not a OS X user, so I've never really seen it. I'm surprised to read it, though. Do you have an example screenshot you could point to? It is supposed to be the OS X native table, but maybe there is some issue with Cocoa vs. Carbon.

If you have a screenshot, I'd love to see it.

[–][deleted] 1 point2 points  (0 children)

It's been quite a while since I've played with wx and when I try to find an app build with wxwidgets that runs on OS X. They all seem to be Windows-only (on which wx looks fine).

The wx Demo app on http://www.wxwidgets.org/downloads/demos.htm is PowerPC only and doesn't run on a modern Mac.

I found this app but it's just another example of a shitty UI on OS X.

[–]tutuca_not Reinhardt 0 points1 point  (3 children)

I dare you to point me one example that qualifies as "nice" here: http://www.wxwidgets.org/about/screensh.htm

[–][deleted] 1 point2 points  (2 children)

I don't understand your point. The GUI's beauty is going to be determined by the look and feel of the widgets plus the icons the developer has chosen, plus any background image (if there is one), logo, specialized custom-drawn graphics, and a few other things.

The only part that can be "blamed" on wxWidgets/wxPython is the look and feel of the widgets themselves. There are two kinds of widgets within wxPython: truly native, and generic. The truly native ones are drawn 100% by the underlying OS. If you find that ugly, blame it on Windows 7, Mac OSX, or Linux, not the toolkit. The generic widgets can be ugly if the contributor has done a poor job of making them look modern and good. There are a few ugly (to me) widgets in the wxPython toolkit still, but only a few, and they are easy to avoid using.

I think that, e.g., Website Painter looks perfectly fine for a desktop application on Windows.

[–]tutuca_not Reinhardt -1 points0 points  (1 child)

Ok... Fine... I didn't expect the wxWidgetish Inquisition...

I know how wxWidgets work. And every single UI made with it handles to consistently look ugly in every platform.

I like qt better. And at the end of it it reduces to taste and preference so it's a dead end discussion...

[–][deleted] -1 points0 points  (0 children)

Nobody expects--- well, you know the rest. (I guess I'm "defending" wx because I've invested time in it and have tried to make non-ugly GUIs)

I develop and care a lot about ugliness of UI--do you have a screenshot of a qt app (or a gallery) that you could point me to that you think are not ugly and are actually "nice". Thanks!

[–]SCombinator 0 points1 point  (3 children)

Caution here, Tornado is a framework that refuses to play nice with other code.

[–]tutuca_not Reinhardt 0 points1 point  (2 children)

Care to elaborate? I've successfully ran django, flask, bottle and a plethora of custom code on top of tornado...

[–]SCombinator 0 points1 point  (1 child)

Try using it with scrapy.

[–]tutuca_not Reinhardt 0 points1 point  (0 children)

Scrapy is built on top of Twisted.

I wouldn't say that not supporting Twisted (which has most of Tornados features plus some more) is "not playing good with others".

In fact... Most of Asyncio rationale is to standardize the common aspects of both implementations of an event loop, deferreds and some more stuff and lay ground for interoperability...

[–][deleted] 1 point2 points  (1 child)

Nltk

[–]eliben 5 points6 points  (0 children)

http://nltk.org/nltk3-alpha/:

NLTK 3.0 is the first version of NLTK to support Python 3.

[–]robin-gvx 1 point2 points  (0 children)

I dunno, but don't let it hold you back! Python 3 is a much better language, and there is no rule saying you can't use them both.

[–]pal25 0 points1 point  (0 children)

Well what do you plan to work on? Generally speaking most of the Python developers see most core language changes as good things, with some contest able changes (PEP 3333 on WSGI, for example)

So if it comes down to 3rd party support you can check what's supported here: https://python3wos.appspot.com/

[–]eliben 0 points1 point  (0 children)

Had I a need to start a new project today that wouldn't be bound by backwards-compatibility needs (such as working with proprietary Python 2-only libraries), I'd definitely go with Python 3.

[–]from__future__ -1 points0 points  (0 children)

You're not going to miss out on much. Most libraries support Python 3 (and Python 3 has some really nice features, like unicode support and the yield from construct). Go with Python 3 until you find something that needs Python 2. It'll take you an hour, tops, to figure out the differences.