Closed scollis closed 6 years ago
Thanks @scollis , I've changed the print statements to functions. I don't have python3 running on my laptop at the moment so I haven't tested compatibility yet, but I don't think there should be any other problems.
OK.. Cool. I just started working on this here: https://github.com/scollis/figurefirst/tree/py3x/figurefirst
I did the same and ran into this issue:
In [1]: import numpy as np
...: import matplotlib.pyplot as plt
...: from figurefirst import FigureLayout
...:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-66233f663224> in <module>()
1 import numpy as np
2 import matplotlib.pyplot as plt
----> 3 from figurefirst import FigureLayout
/Users/scollis/anaconda/envs/houston/lib/python3.5/site-packages/figurefirst/__init__.py in <module>()
----> 1 import svg_to_axes
2 reload(svg_to_axes)
3 import mpl_functions
4 from svg_to_axes import FigureLayout
ImportError: No module named 'svg_to_axes'
Also found an error here.. I am working on a PR:
AttributeError Traceback (most recent call last)
Found another issue:
/Users/scollis/anaconda/envs/houston/lib/python3.5/site-packages/figurefirst/svg_to_axes.py in parse_transform(transform_str)
176 ##################
177 trnsfrms = [mtrx for (pos,mtrx) in sorted(zip([tr_pos,mt_pos,sc_pos],
--> 178 [tr,mt,sc]))]
179 trnsfrms = [m for m in trnsfrms if not(m is None)]
180 from numpy import dot
TypeError: unorderable types: NoneType() < int()
In [4]: sorted?
Signature: sorted(iterable, key=None, reverse=False)
Docstring:
Return a new list containing all items from the iterable in ascending order.
A custom key function can be supplied to customize the sort order, and the
reverse flag can be set to request the result in descending order.
Type: builtin_function_or_method
I kinda cant fix that... Too mixed up.. packaging some quick work I did into a PR.
Long time getting to this but I think we mostly have python3 compatibility now.
Love the idea, but as some one who is avoiding going back to 2.7 at all costs no 3.x is a non-starter.
I see prints are still being used as statements.