[Urwid] Urwid and Python 3

Wendell Smith wackywendell at gmail.com
Wed Aug 4 16:00:36 EDT 2010


  Hi,

I contacted this list earlier to ask about python 3, and it sounded like 
you all had enough work to do without worrying about it. Since I would 
like to use urwid for an ipython interpreter, and ipython wants to 
switch to python 3 as soon as possible, I thought I might see how well 
it works to switch urwid over to python 3... and after trying it out, I 
have a fairly well working python 3 version of urwid!

Its available at http://github.com/wackywendell/urwid
Or if you're using git:
$ git clone git://github.com/wackywendell/urwid.git

Its setup to use the recommended way of converting to python 3: the code 
posted is working py2.6 code, and if you run the 2to3 converter on it, 
it should give you working python3 code. There is a script called 
'23dir' in there as well, which runs through the urwid directory, and 
copies everything to an urwid3 directory. When its done, there should be 
a working python3 implementation.

I say its working... and it is: run python tour.py, and it works, even 
with unicode characters. At least, on my machine, with European unicode 
characters. I'm pretty sure I've killed any support for wide characters 
(because I don't understand how that worked, sorry.) It also doesn't 
pass many of the unit tests in python3... but, well, I'm not done, I 
just tried out the conversion to see how feasible it was.

Anyways, please tell me what you think!

-Wendell



More information about the Urwid mailing list