def __iter__(self):
        """Generator of generators that yield csv data"""

        with AOpen(self.path, "rb", main_window=self.main_window) as csv_file:
            csv_reader = csv.reader(csv_file, self.dialect)

            self.first_line = self.has_header

            for line in csv_reader:
                yield self._get_csv_cells_gen(line)
                break

            self.first_line = False

            for line in csv_reader:
                yield self._get_csv_cells_gen(line)

        msg = _("File {filename} imported successfully.").format(
            filename=self.csvfilename)
        post_command_event(self.main_window, self.StatusBarMsg, text=msg)
def __iter__ ( self ) : with AOpen ( self . path , "rb" , main_window = self . main_window ) as csv_file : csv_reader = csv . reader ( csv_file , self . dialect ) self . first_line = self . has_header for line in csv_reader : yield self . _get_csv_cells_gen ( line ) break self . first_line = False for line in csv_reader : yield self . _get_csv_cells_gen ( line ) msg = _ ( "File {filename} imported successfully." ) . format ( filename = self . csvfilename ) post_command_event ( self . main_window , self . StatusBarMsg , text = msg )
Generator of generators that yield csv data