Merge branch 'Eric_new_Python_API' of git@git.metabarcoding.org:obitools/obitools3.git into Eric_new_Python_API

This commit is contained in:
Celine Mercier
2017-04-06 15:39:52 +02:00

View File

@ -1,4 +1,5 @@
#cython: language_level=3 #cython: language_level=3
from obitools3.dms.column import typed_column
__OBIDMS_COLUMN_CLASS__ = {} __OBIDMS_COLUMN_CLASS__ = {}
@ -24,6 +25,8 @@ from obitools3.utils cimport tobytes, \
bytes2str, \ bytes2str, \
str2bytes str2bytes
from obitools3.dms.column import typed_column
import importlib import importlib
import inspect import inspect
import pkgutil import pkgutil
@ -348,8 +351,8 @@ cdef register_column_class(obitype_t obitype,
cdef register_all_column_classes() : cdef register_all_column_classes() :
#obi3 = importlib.import_module("obitools3") #obi3 = importlib.import_module("obitools3")
x = list(pkgutil.walk_packages()) # TODO restrain the walking x = list(pkgutil.walk_packages(typed_column.__path__)) # TODO restrain the walking
all_modules = [importlib.import_module(a[1]) for a in x if a[1].startswith("obitools3.dms.column.typed_column.")] all_modules = [importlib.import_module(a[1]) for a in x]
for mod in all_modules : for mod in all_modules :
getattr(mod, 'register_class')() getattr(mod, 'register_class')()