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

Class ParsedParameterFile

Utilities --+        
            |        
    FileBasis --+    
                |    
  FileBasisBackup --+
                    |
                   ParsedParameterFile


Parameterfile whose complete representation is read into memory, can be manipulated and afterwards written to disk
Method Summary
  __init__(self, name, backup, debug)
  __getitem__(self, key)
  __setitem__(self, key, value)
  makeString(self)
Generates a string from the contents in memory
  parse(self, content)
Constructs a representation of the file
    Inherited from FileBasisBackup
  restore(self)
if a backup-copy was made the file is restored from this
    Inherited from FileBasis
  closeFile(self)
closes the file
  copyRest(self, l, out)
Copy the rest of the file
  goMatch(self, l, exp, out, stop)
Read lines until a regular expression is matched
  goTo(self, l, s, out, echoLast, stop)
Read lines until a token is found
  makeTemp(self)
creates a temporary file
  openFile(self, keepContent, mode)
opens the file.
  purgeFile(self)
Undo all the manipulations done by PyFOAM
  readFile(self)
read the whole File into memory
  writeFile(self)
write the whole File from memory
    Inherited from Utilities
  execute(self, cmd, debug)
Execute the command cmd
  listDirectory(self, d)
Lists the files in a directory, but excludes certain names and files with certain endings
  writeDictionaryHeader(self, f)
Writes a dummy header so OpenFOAM accepts the file as a dictionary

Class Variable Summary
    Inherited from FileBasis
str addedString = '//PyFoamAdded'
str removedString = '//PyFoamRemoved: '
    Inherited from Utilities
list excludeNames = ['^.svn$', '~$']

Method Details

__init__(self, name, backup=False, debug=False)
(Constructor)

Parameters:
name - The name of the parameter file
backup - create a backup-copy of the file
Overrides:
PyFoam.RunDictionary.FileBasis.FileBasisBackup.__init__

makeString(self)

Generates a string from the contents in memory
Overrides:
PyFoam.RunDictionary.FileBasis.FileBasis.makeString

parse(self, content)

Constructs a representation of the file
Overrides:
PyFoam.RunDictionary.FileBasis.FileBasis.parse

Generated by Epydoc 2.1 on Mon Jan 22 23:52:48 2007 http://epydoc.sf.net