CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
csvReporter.csvReporter Class Reference
Inheritance diagram for csvReporter.csvReporter:

Public Member Functions

def __init__ (self, filename, dialect='excel', delimiter=', quoting=csv.QUOTE_NONNUMERIC)
 
def close (self)
 
def writeRow (self, row)
 
def writeRows (self, rows)
 

Private Attributes

 __file
 
 __filename
 
 __writer
 

Detailed Description

Definition at line 2 of file csvReporter.py.

Constructor & Destructor Documentation

def csvReporter.csvReporter.__init__ (   self,
  filename,
  dialect = 'excel',
  delimiter = ',
  quoting = csv.QUOTE_NONNUMERIC 
)
input params:
filename : output csv path/name

Definition at line 3 of file csvReporter.py.

3  def __init__(self,filename,dialect='excel',delimiter=',',quoting=csv.QUOTE_NONNUMERIC):
4  """input params:
5  filename : output csv path/name
6  """
7  self.__filename=filename
8  self.__file=open(self.__filename,'wb')
9  self.__writer=csv.writer(self.__file)
def __init__(self, filename, dialect='excel', delimiter=', quoting=csv.QUOTE_NONNUMERIC)
Definition: csvReporter.py:3

Member Function Documentation

def csvReporter.csvReporter.close (   self)
def csvReporter.csvReporter.writeRow (   self,
  row 
)

Definition at line 10 of file csvReporter.py.

References csvReporter.csvReporter.__filename, csvLumibyLSParser.csvLumibyLSParser.__filename, and dataset.Dataset.__filename.

10  def writeRow(self,row):
11  try:
12  self.__writer.writerow(row)
13  except csv.Error as e:
14  sys.exit('file %s: %s'%(self.__filename,e))
def writeRow(self, row)
Definition: csvReporter.py:10
def csvReporter.csvReporter.writeRows (   self,
  rows 
)

Definition at line 15 of file csvReporter.py.

References csvReporter.csvReporter.__filename, csvLumibyLSParser.csvLumibyLSParser.__filename, and dataset.Dataset.__filename.

15  def writeRows(self,rows):
16  try:
17  self.__writer.writerows(rows)
18  except csv.Error as e:
19  sys.exit('file %s: %s'%(self.__filename,e))
def writeRows(self, rows)
Definition: csvReporter.py:15

Member Data Documentation

csvReporter.csvReporter.__file
private

Definition at line 8 of file csvReporter.py.

csvReporter.csvReporter.__filename
private
csvReporter.csvReporter.__writer
private

Definition at line 9 of file csvReporter.py.