Cython: View: lines from simple View instances are now displayed in tab
instead of dict format
This commit is contained in:
@ -46,6 +46,8 @@ from ..capi.obitypes cimport is_a_DNA_seq, \
|
|||||||
|
|
||||||
from ..capi.obidms cimport obi_import_view
|
from ..capi.obidms cimport obi_import_view
|
||||||
|
|
||||||
|
from obitools3.format.tab import TabFormat
|
||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
import inspect
|
import inspect
|
||||||
import pkgutil
|
import pkgutil
|
||||||
@ -747,14 +749,9 @@ cdef class Line :
|
|||||||
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
cdef dict line
|
formatter = TabFormat(header=False)
|
||||||
cdef bytes column_name_b
|
return bytes2str(formatter(self))
|
||||||
cdef str column_name_str
|
|
||||||
line = {}
|
|
||||||
for column_name_b in self._view.keys() :
|
|
||||||
column_name_str = bytes2str(column_name_b)
|
|
||||||
line[column_name_str] = self[column_name_str]
|
|
||||||
return str(line)
|
|
||||||
|
|
||||||
# View property getter
|
# View property getter
|
||||||
@property
|
@property
|
||||||
|
Reference in New Issue
Block a user