CMS 3D CMS Logo

Public Member Functions | Private Attributes

csvReporter::csvReporter Class Reference

List of all members.

Public Member Functions

def __init__
def close
def writeRow
def writeRows

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.

00004                                                                                           :
00005         """input params:
00006         filename : output csv path/name
00007         """
00008         self.__filename=filename
00009         self.__file=open(self.__filename,'wb')
        self.__writer=csv.writer(self.__file)

Member Function Documentation

def csvReporter::csvReporter::close (   self)

Definition at line 20 of file csvReporter.py.

00021                    :
00022         self.__file.close()

def csvReporter::csvReporter::writeRow (   self,
  row 
)

Definition at line 10 of file csvReporter.py.

00011                           :
00012         try:
00013             self.__writer.writerow(row)
00014         except csv.Error,e:
            sys.exit('file %s: %s'%(self.__filename,e))
def csvReporter::csvReporter::writeRows (   self,
  rows 
)

Definition at line 15 of file csvReporter.py.

00016                             :
00017         try:
00018             self.__writer.writerows(rows)
00019         except csv.Error,e:
            sys.exit('file %s: %s'%(self.__filename,e))

Member Data Documentation

Definition at line 5 of file csvReporter.py.

Definition at line 5 of file csvReporter.py.

Definition at line 5 of file csvReporter.py.