Hi Kovid,
Unfortunately, Python 2 has broken windows sys.argv Unicode commandline parsing, multiprocessing is also severely broken because they used a naked fork without an exec on Linux, and MacOS X so that they would not have to serialized objects/state and pass it to the newly started process, etc. All of these problems have been around for years but never fixed in Python 2. Hell the naked fork problem was only fixed in Python 3.4! Tk askdirectory does not return Unicode on Windows, etc, etc. We have found ways to work around most of these but broken multiprocessing is a hard one to fix as it severely limits the new process to only pure ansi functions to prevent crashes. Yes we could move to threads but the big lock kind of defeats the whole purpose.
If I thought some group would truly fork Python 2.7/2.8 and actually start fixing things properly and backporting these critical fixes then I would stay with Python 2. But somehow all of these fixes get called "new features" by the Python developers and never get added to the 2.X stream.
So right now, we use your from future import line and then add our little compatibility lib and try to write code that runs as is on both Python 2 and Python 3. That is what the launcher does and what a future version of KindleUnpack will do once I get some free time.
Take care,
KevinH
Last edited by KevinH; 09-30-2014 at 10:17 AM.
|