Cython API: automatic importing of column classes now works

This commit is contained in:
Celine Mercier
2017-04-06 15:45:02 +02:00
parent f351540b0b
commit a3fad27190

View File

@ -350,8 +350,7 @@ cdef register_column_class(obitype_t obitype,
cdef register_all_column_classes() :
#obi3 = importlib.import_module("obitools3")
x = list(pkgutil.walk_packages(typed_column.__path__)) # TODO restrain the walking
x = list(pkgutil.walk_packages(typed_column.__path__, prefix="obitools3.dms.column.typed_column."))
all_modules = [importlib.import_module(a[1]) for a in x]
for mod in all_modules :
getattr(mod, 'register_class')()