File size: 690 Bytes
8813b45 dd5adff 19b8852 8b90397 19b8852 a3afcbc 19b8852 a3afcbc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
from .hoho import *
from . import vis
from . import read_write_colmap
from .wed import compute_WED
import importlib
import sys
class LazyLoadModule:
def __init__(self, module_name):
self.module_name = module_name
self.module = None
def __getattribute__(self, attr):
if attr == 'module_name' or attr == 'module':
return super().__getattribute__(attr)
if self.module is None:
self.module = importlib.import_module(f'hoho.{self.module_name}')
sys.modules[self.module_name] = self.module
return getattr(self.module, attr)
try:
import viz3d
except ImportError:
viz3d = LazyLoadModule('viz3d')
|