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 obitools3.format.tab import TabFormat
|
||||
|
||||
import importlib
|
||||
import inspect
|
||||
import pkgutil
|
||||
@ -747,14 +749,9 @@ cdef class Line :
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
cdef dict line
|
||||
cdef bytes column_name_b
|
||||
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)
|
||||
formatter = TabFormat(header=False)
|
||||
return bytes2str(formatter(self))
|
||||
|
||||
|
||||
# View property getter
|
||||
@property
|
||||
|
Reference in New Issue
Block a user