grepros 1.2.2
grep for ROS bag files and live topics
Loading...
Searching...
No Matches
CsvWriter Class Reference

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

Public Member Functions

 __init__ (self, csvfile, dialect="excel", **fmtparams)
 
 writerow (self, row)
 Writes the row to the writer’s file object.
 
 writerows (self, rows)
 Writes the rows to the writer’s file object.
 

Properties

 dialect = property
 A read-only description of the dialect in use by the writer.
 

Detailed Description

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

Definition at line 187 of file csv.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  csvfile,
  dialect = "excel",
**  fmtparams 
)
Parameters
csvfilefile-like object with write() method
dialectCSV dialect to use, one from csv.list_dialects()
fmtparamsoverride individual format parameters in dialect

Definition at line 196 of file csv.py.

Member Function Documentation

◆ writerow()

writerow (   self,
  row 
)

Writes the row to the writer’s file object.

Fields will be formatted according to the current dialect.

Parameters
rowiterable of field values
Returns
return value of the call to the write method of the underlying file object

Definition at line 220 of file csv.py.

◆ writerows()

writerows (   self,
  rows 
)

Writes the rows to the writer’s file object.

Fields will be formatted according to the current dialect.

Parameters
rowsiterable of iterables of field values

Definition at line 251 of file csv.py.

Property Documentation

◆ dialect

dialect = property
static

A read-only description of the dialect in use by the writer.

Definition at line 208 of file csv.py.


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