Package diffpy :: Package Structure :: Package Parsers :: Module P_auto :: Class P_auto
[hide private]
[frames] | no frames]

Class P_auto

source code

structureparser.StructureParser --+
                                  |
                                 P_auto

Parser with automatic detection of structure format.
When successful, it sets its format attribute to detected
structure format.



Instance Methods [hide private]
 
__init__(self) source code
 
getOrderedFormats(self)
Build a list of relevance ordered structure formats.
source code
 
parseLines(self, lines)
Detect format and parse given list of lines.
source code

Inherited from structureparser.StructureParser: parse, parseFile, toLines, tostring

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: structureparser.StructureParser.__init__

getOrderedFormats(self)

source code 
Build a list of relevance ordered structure formats.
This only works when self.filename has a known extension.

parseLines(self, lines)

source code 
Detect format and parse given list of lines.
Set format attribute to the detected file format.

Return Structure instance, or raise StructureFormatError.

Overrides: structureparser.StructureParser.parseLines