I have been working on making fonttools work on both Python 2 and 3 as well.
Sorry I hadn't shared my code before.
There’s quite a few cases where there is no need to wrap in list as
iterators are fine and only used for loops.
There’s only a few cases where they need to be as lists, sometimes
sorted or reversed.
I’ve updated my code at https://github.com/moyogo/fonttools/tree/py2and3
I haven't been able to work on the str, unicode and bytes issue yet.
On Fri, Nov 22, 2013 at 10:39 AM, Andrew Miller <A.J.Miller@bcs.org.uk> wrote:
> Hi Behdad,
> I applied the following 2to3 fixes to make the code compliant:
> Replacing map with list comprehensions is probably better. I'm not that
> familiar with either map or list comprehensions so I've left them as they
> are for now.
> On 22 November 2013 00:32, Behdad Esfahbod <email@example.com> wrote:
>> On 13-11-21 11:04 AM, Andrew Miller wrote:
>> > I have been working on a number of fixes to make FontTools compatible
>> > with
>> > Python 3.x. I am having trouble creating a fork in Sourceforge (getting
>> > a
>> > HTTP 500 error), so for now I have hosted a git repository on BitBucket
>> > at
>> > https://bitbucket.org/Milla/fonttools.
>> Hi Andrew,
>> I took a quick look. Looks good. A few comments:
>> - Instead of "Wrapped map methods with calls to list()", perhaps just
>> replace them with list comprehension? Ie. instead of
>> things)), do [string.atoi(x) for x in things]?
>> - Re "Wrapped dict methods with calls to list()", is there not a better
>> recommended to do this? I don't know. Just asking.
>> I plan to pick these up in my tree (github.com/behdad/fonttools) soon.
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> FontTools-discussion mailing list
Denis Moyogo Jacquerye
African Network for Localisation http://www.africanlocalisation.net/
Nkótá ya Kongó míbalé --- http://info-langues-congo.1sd.org/
DejaVu fonts --- http://www.dejavu-fonts.org/