New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 2 and 3 #37
Python 2 and 3 #37
Conversation
Hit by Google Fonts's font "Cabin" for example.
Conflicts: Lib/fontTools/ttLib/tables/otTables.py
@moyogo I suggest you use |
I will be doing a clean pickup of this eventually... |
* replaced <> by != * replace `a` by repr(a) * replace IntType, TupleType, etc. by int, tuple in type testing * replace string.strip(a) by a.strip(), same for string.split() and string.join() * replace def function(arg1, (arg2a, arg2b), arg3) by def function(arg1, args, arg3) followed by arg2a, arg2b = args * replace print a by print(a) * replace map() by list comprehension when necessary * looked at https://bitbucket.org/Milla/fonttools * import print and division from __future__ as Milla * changed some print and / to // as Milla * use argument named element for xml functions as Milla
# The first commit's message is: * element instead args # This is the 2nd commit message: Initial Python 2 and 3 modifications: * replaced <> by != * replace `a` by repr(a) * replace IntType, TupleType, etc. by int, tuple in type testing * replace string.strip(a) by a.strip(), same for string.split() and string.join() * replace def function(arg1, (arg2a, arg2b), arg3) by def function(arg1, args, arg3) followed by arg2a, arg2b = args * replace print a by print(a) * replace map() by list comprehension when necessary * looked at https://bitbucket.org/Milla/fonttools * import print and division from __future__ as Milla * changed some print and / to // as Milla * use argument named element for xml functions as Milla
* replaced <> by != * replace `a` by repr(a) * replace IntType, TupleType, etc. by int, tuple in type testing * replace string.strip(a) by a.strip(), same for string.split() and string.join() * replace def function(arg1, (arg2a, arg2b), arg3) by def function(arg1, args, arg3) followed by arg2a, arg2b = args * replace print a by print(a) * replace map() by list comprehension when necessary * looked at https://bitbucket.org/Milla/fonttools * import print and division from __future__ as Milla * changed some print and / to // as Milla * use argument named element for xml functions as Milla
Yeah, sorry about that. I keep having issue with rebasing, I'll avoid it On Mon, Nov 25, 2013 at 10:07 AM, Behdad Esfahbod
|
I'm started working on this myself. Doing one micro commit per fix. |
I pushed my own rework here: https://github.com/behdad/fonttools/commits/2and3 Haven't figured out unicode vs bytestring :(. |
@moyogo mind reviewing my changes? I'm trying to sort out the last str/unicode bits. |
I have a finished branch here now: Will merge tomorrow. |
Thanks Behdad, I’ll put what I find in https://github.com/moyogo/fonttools/tree/2and3 |
Python 3.3.2 was also complaining about some things. It’s fine now. |
Fixed in master. b3b21fb |
glifLib: don't write empty 'lib' element in layerinfo.plist
Changes to work in Python 2 and 3. Added some changes from Andrew Miller’s https://bitbucket.org/Milla/fonttools
Todo: bytes, strings and unicode strings.