If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2013-09-04
I'm afraid above patch was only the tip of the iceberg. Current xlib still uses tons of deprecated Python concepts, such as old-style classes, intermixing bytes and str, calling apply(), obsolete cmp(), the "new" module, and so on. On top of that, there are some Python 3 specific things which need to be ported, such as / now yielding a float (needs //), and imports now always being absolute instead of relative.
The attached patch ports the whole Xlib, plus the examples and the tests. With this, all test cases and examples work with both python 2.7 and 3.3.
Patch for python-3.1 support.
I'm afraid above patch was only the tip of the iceberg. Current xlib still uses tons of deprecated Python concepts, such as old-style classes, intermixing bytes and str, calling apply(), obsolete cmp(), the "new" module, and so on. On top of that, there are some Python 3 specific things which need to be ported, such as / now yielding a float (needs //), and imports now always being absolute instead of relative.
The attached patch ports the whole Xlib, plus the examples and the tests. With this, all test cases and examples work with both python 2.7 and 3.3.
Here is an updated version of the patch that fixes a couple of porting errors.