Make meshcut compatible with Python 3
Closed this issue · 4 comments
I just pip installed meshcut
and tried to import the module.
Traceback (most recent call last):
File "/home/tom/portaal/env/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2961, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-99-cb3daef93112>", line 1, in <module>
import meshcut
File "/home/tom/portaal/env/lib/python3.6/site-packages/meshcut.py", line 228
print 'Degenerate case (probably non-closed mesh)'
^
SyntaxError: invalid syntax
Due to missing parentheses in print statement. Are there many more issues you could think of why meshcut will not run with Python3? Else I try to create a PR.
With a git clone and editable install the problem seems to be gone, PyPi is not up-to-date?
A next issue I spotted is the use of xrange()
, this can simply be replaced with range()
for Python 3.x
Ah yeah, maybe pypi is not up-to-date. This is something I can take care off.
I think the xrange
issue is why I commented out the python 3
in the travis.yml
file. If you want to do a PR for that and check it works with python 3, that would be welcome. I would then do the pypi update
Sorry, accidentally closed the issue