(self, export_instances)
Open the _PaginatedWriter for writing. This must be called before using _PaginatedWriter.write().
        A _PaginatedWriter can only be opened once.
Open the _PaginatedWriter for writing. This must be called before using _PaginatedWriter.write().
        A _PaginatedWriter can only be opened once.
Open the _PaginatedWriter for writing . This must be called before using _PaginatedWriter . write () . A _PaginatedWriter can only be opened once .
def open(self, export_instances):
        """
        Open the _PaginatedWriter for writing. This must be called before using _PaginatedWriter.write().
        A _PaginatedWriter can only be opened once.
        """

        self.name = self._get_name(export_instances)
        self.headers = self._get_headers(export_instances)
        self.table_names = self._get_table_names(export_instances)

        with open(self.path, 'wb') as file_handle:
            self.writer.open(
                self._get_paginated_headers().items(),
                file_handle,
                table_titles=self._get_paginated_table_titles(),
                archive_basepath=self.name
            )
            try:
                yield
            finally:
                self.writer.close()
def open ( self , export_instances ) : self . name = self . _get_name ( export_instances ) self . headers = self . _get_headers ( export_instances ) self . table_names = self . _get_table_names ( export_instances ) with open ( self . path , 'wb' ) as file_handle : self . writer . open ( self . _get_paginated_headers ( ) . items ( ) , file_handle , table_titles = self . _get_paginated_table_titles ( ) , archive_basepath = self . name ) try : yield finally : self . writer . close ( )