diff --git a/python/obitools3/obidms/_obidms.pyx b/python/obitools3/obidms/_obidms.pyx index f5b22d1..6437090 100644 --- a/python/obitools3/obidms/_obidms.pyx +++ b/python/obitools3/obidms/_obidms.pyx @@ -304,29 +304,21 @@ cdef class OBIView : def __repr__(self) : cdef str s - s = str(self.name) + ", " + str(self.comments) + ", " + str(self.pointer.infos.line_count) + " lines\n" + s = str(self.name) + "\n" + str(self.comments) + "\n" + str(self.pointer.infos.line_count) + " lines\n" for column_name in self.columns : s = s + self.columns[column_name].__repr__() + '\n' return s cpdef delete_column(self, str column_name) : - - cdef int i - cdef Obiview_p view_p - cdef OBIDMS_column column - cdef OBIDMS_column_p column_p - cdef OBIDMS_column_header_p header + cdef str column_n - - view = self.pointer - - if obi_view_delete_column(view_p, str2bytes(column_name)) < 0 : + + if obi_view_delete_column(self.pointer, str2bytes(column_name)) < 0 : raise Exception("Problem deleting a column from a view") # Update the dictionaries of column pointers and column objects, and update pointers in column objects (make function?): (self.columns).pop(column_name) - for column_n in self.columns : (self.columns[column_n]).update_pointer() @@ -345,9 +337,9 @@ cdef class OBIView : bint create=True ) : - cdef bytes column_name_b - cdef bytes elements_names_b - cdef object subclass + cdef bytes column_name_b + cdef bytes elements_names_b + cdef object subclass cdef OBIDMS_column_p column_p column_name_b = str2bytes(column_name)