You pass a path and any options you wish to set for the read. I am trying to create a text file in csv format out of a pyqt4 qtablewidget. Each row of file will be passed to the provided block in turn.