Package diffpy :: Package srrietveld :: Package convert :: Module listfilereader :: Class ListFileReader
[frames] | no frames]

Class ListFileReader

source code

object --+
         |
        ListFileReader
Known Subclasses:

Object for loading datafiles and temperatures from a list file.
Bank columns are loaded as list of strings, all other columns are
converted to floats.

Class variables:

labelaliases -- dictionary of alternative column labels.

Instance variables:

columnlabels -- list of column labels in the loaded list file
banklabels   -- list of bank-column labels sorted by bank index
column       -- dictionary that maps column label to associated
                list of values.

Instance Methods
 
__init__(self, filename=None, fp=None)
Initializa ListFileReader
source code
 
readFile(self, fp)
Read listfile from a file-type object fp.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, filename=None, fp=None)
(Constructor)

source code 

Initializa ListFileReader

filename -- optional path to a list file to be loaded fp -- file type object to be read

Only one of filename, fp arguments can be specified.

Overrides: object.__init__

readFile(self, fp)

source code 

Read listfile from a file-type object fp.

No return value. Raise SrrFileError if file loading failed.