Python3 compatible scripts
Change use of python in ParaView to be Python3 compatible.
The most common changes:
-
print "foo"
=>print ("foo")
-
raise RuntimeError, "failed"
=>raise RuntimeError("failed")
-
next()
=>__next__()
- import of relative submodules is disallowed.
- use
import __future__
to get python3 behavior in python2
Spot fixes:
-
map()
returns an iterable, not a list - type str now has attr
__iter__
, so looks iterable. - python3 dropped iteritems() - just use key to get value.
@utkarsh.ayachit any python gurus who should take a look?