dreamworksanimation / usdmanager

USD Manager
http://www.usdmanager.org
Apache License 2.0
321 stars 60 forks source link

Added various Python 2/3 compatibility changes #28

Closed jonjondev closed 2 years ago

jonjondev commented 2 years ago

This PR contains a series of compatibility changes that allow for relatively similar behaviour between Python 2 and 3.

Primarily this takes the form of fixes for division and rounding, as well as differing imports. Two utility functions have been added to accommodate this: round() (to ensure matching rounding operations between Python versions) and isPy3() (in lieu of adding the whole of the Six library for that check).