diff --git a/python/obitools3/obidms/_obidms.pxd b/python/obitools3/obidms/_obidms.pxd index 3c88c01..75cfa1b 100644 --- a/python/obitools3/obidms/_obidms.pxd +++ b/python/obitools3/obidms/_obidms.pxd @@ -67,7 +67,10 @@ cdef class OBIView: cpdef select_line(self, index_t line_nb) cpdef select_lines(self, list line_selection) cpdef save_and_close(self) - + cpdef str get_name(self) + cpdef dict get_columns(self) + cpdef int get_line_count(self) + cdef class OBIView_NUC_SEQS(OBIView): diff --git a/python/obitools3/obidms/_obidms.pyx b/python/obitools3/obidms/_obidms.pyx index 23267af..3287767 100644 --- a/python/obitools3/obidms/_obidms.pyx +++ b/python/obitools3/obidms/_obidms.pyx @@ -292,7 +292,7 @@ cdef class OBIView : self.pointer = view self.name = bytes2str(view.infos.name) - # Go through columns to build list of corresponding python instances + # Go through columns to build dictionaries of corresponding python instances self.columns = {} for i in range(view.infos.column_count) : column_p = (view.columns)[i] @@ -462,6 +462,18 @@ cdef class OBIView : to_print = to_print + str(line) + "\n" return to_print + + cpdef str get_name(self): + return self.name + + + cpdef dict get_columns(self): + return self.columns + + + cpdef int get_line_count(self) : + return self.pointer.infos.line_count + #############################################