Browse Source

python: make `import magnum.math` working.

pull/1/head
Vladimír Vondruš 7 years ago
parent
commit
4cca099297
  1. 6
      src/python/magnum/__init__.py

6
src/python/magnum/__init__.py

@ -27,6 +27,12 @@
from ._magnum import *
# This feels extremely hackish, but without that it wouldn't be possible to
# do `import magnum.math`, which is weird (`from magnum import math` works,
# tho, for whatever reason)
import sys
sys.modules['magnum.math'] = _magnum.math
__all__ = [
'Deg', 'Rad',

Loading…
Cancel
Save