Package PyFoam :: Package RunDictionary :: Module ParsedParameterFile :: Class ParsedParameterFile
[hide private]
[frames] | no frames]

Class ParsedParameterFile

source code

                object --+            
                         |            
Basics.Utilities.Utilities --+        
                             |        
           FileBasis.FileBasis --+    
                                 |    
         FileBasis.FileBasisBackup --+
                                     |
                                    ParsedParameterFile

Parameterfile whose complete representation is read into memory, can be manipulated and afterwards written to disk

Instance Methods [hide private]
 
__init__(self, name, backup=False, debug=False, boundaryDict=False, listDict=False, listDictWithHeader=False, listLengthUnparsed=None, noHeader=False, noBody=False, doMacroExpansion=False, dontRead=False, createZipped=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
parse(self, content)
Constructs a representation of the file
source code
 
__contains__(self, key) source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, value) source code
 
__delitem__(self, key) source code
 
__len__(self) source code
 
__iter__(self) source code
 
__str__(self)
Generates a string from the contents in memory Used to be called makeString
source code

Inherited from FileBasis.FileBasisBackup: restore

Inherited from FileBasis.FileBasis: baseName, closeFile, copyRest, getCaseDir, goMatch, goTo, makeTemp, openFile, purgeFile, readFile, realName, writeFile, writeFileAs

Inherited from Basics.Utilities.Utilities: execute, listDirectory, writeDictionaryHeader

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]

Inherited from FileBasis.FileBasis: addedString, removedString

Inherited from Basics.Utilities.Utilities: excludeNames

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, backup=False, debug=False, boundaryDict=False, listDict=False, listDictWithHeader=False, listLengthUnparsed=None, noHeader=False, noBody=False, doMacroExpansion=False, dontRead=False, createZipped=True)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • name - The name of the parameter file
  • backup - create a backup-copy of the file
  • boundaryDict - the file to parse is a boundary file
  • listDict - the file only contains a list
  • listDictWithHeader - the file only contains a list and a header
  • listLengthUnparsed - Lists longer than that length are not parsed
  • noHeader - don't expect a header
  • noBody - don't read the body of the file (only the header)
  • doMacroExpansion - expand #include and $var
  • dontRead - Do not read the file during construction
Overrides: object.__init__

parse(self, content)

source code 

Constructs a representation of the file

Overrides: FileBasis.FileBasis.parse

__str__(self)
(Informal representation operator)

source code 

Generates a string from the contents in memory Used to be called makeString

Overrides: object.__str__