Public Member Functions | Private Attributes | List of all members
grepros.plugins.auto.csv.CsvWriter Class Reference
Inheritance diagram for grepros.plugins.auto.csv.CsvWriter:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, csvfile, dialect="excel", **fmtparams)
 
def dialect (self)
 
def writerow (self, row)
 
def writerows (self, rows)
 

Private Attributes

 _buffer
 
 _dialect
 
 _file
 
 _format
 
 _writer
 

Detailed Description

Wraps csv.writer with bool conversion, iterator support, and lesser memory use.

Definition at line 179 of file csv.py.

Constructor & Destructor Documentation

◆ __init__()

def grepros.plugins.auto.csv.CsvWriter.__init__ (   self,
  csvfile,
  dialect = "excel",
**  fmtparams 
)
@param   csvfile    file-like object with `write()` method
@param   dialect    CSV dialect to use, one from `csv.list_dialects()`
@param   fmtparams  override individual format parameters in dialect

Definition at line 182 of file csv.py.

Member Function Documentation

◆ dialect()

def grepros.plugins.auto.csv.CsvWriter.dialect (   self)
A read-only description of the dialect in use by the writer.

Definition at line 198 of file csv.py.

◆ writerow()

def grepros.plugins.auto.csv.CsvWriter.writerow (   self,
  row 
)
Writes the row to the writer’s file object.

Fields will be formatted according to the current dialect.

@param   row  iterable of field values
@return       return value of the call to the write method of the underlying file object

Definition at line 202 of file csv.py.

◆ writerows()

def grepros.plugins.auto.csv.CsvWriter.writerows (   self,
  rows 
)
Writes the rows to the writer’s file object.

Fields will be formatted according to the current dialect.

@param   rows  iterable of iterables of field values

Definition at line 234 of file csv.py.

Member Data Documentation

◆ _buffer

grepros.plugins.auto.csv.CsvWriter._buffer
private

Definition at line 189 of file csv.py.

◆ _dialect

grepros.plugins.auto.csv.CsvWriter._dialect
private

Definition at line 191 of file csv.py.

◆ _file

grepros.plugins.auto.csv.CsvWriter._file
private

Definition at line 188 of file csv.py.

◆ _format

grepros.plugins.auto.csv.CsvWriter._format
private

Definition at line 192 of file csv.py.

◆ _writer

grepros.plugins.auto.csv.CsvWriter._writer
private

Definition at line 190 of file csv.py.


The documentation for this class was generated from the following file:


grepros
Author(s): Erki Suurjaak
autogenerated on Sat Jan 6 2024 03:11:30