Package PyFoam :: Package Execution :: Module FoamServer :: Class FoamAnswerer
[hide private]
[frames] | no frames]

Class FoamAnswerer



The class that handles the actual requests (only needed to hide the Thread-methods from the world

Instance Methods [hide private]
  __init__(self, run=None, master=None, lines=100)
  _insertLine(self, line)
Inserts a new line, not to be called via XMLRPC
  argv(self)
Argument vector with which the runner was called
  commandLine(self)
The actual command line used
  configuration(self)
  elapsedTime(self)
  foamVersion(self)
Version number of the Foam-Version
  getEnviron(self, name)
  hostname(self)
  isFoamServer(self)
This is a Foam-Server (True by default)
  isLiving(self)
The calculation still generates output and therefor seems to be living
  isParallel(self)
Is it a parallel run?
  kill(self)
Interrupts the FOAM-process
  lastLine(self)
  mpi(self)
  nrWarnings(self)
Number of warnings the executable emitted
  pyFoamVersion(self)
  scriptName(self)
Name of the Python-Script that runs the show
  tail(self)
  uname(self)

Method Details [hide private]

__init__(self, run=None, master=None, lines=100)
(Constructor)

 
Parameters:
  • run - The thread that controls the run
  • master - The Runner-Object that controls everything
  • lines - the number of lines the server should remember

_insertLine(self, line)

 
Inserts a new line, not to be called via XMLRPC

argv(self)

 
Argument vector with which the runner was called

commandLine(self)

 
The actual command line used

configuration(self)

 
Returns:
all the configured parameters

elapsedTime(self)

 
Returns:
time in seconds since the last line was output

foamVersion(self)

 
Version number of the Foam-Version

getEnviron(self, name)

 
Parameters:
  • name - name of an environment variable
Returns:
value of the variable, empty string if non-existing

hostname(self)

 
Returns:
The name of the computer

isFoamServer(self)

 
This is a Foam-Server (True by default)

isLiving(self)

 
The calculation still generates output and therefor seems to be living

isParallel(self)

 
Is it a parallel run?

kill(self)

 
Interrupts the FOAM-process

lastLine(self)

 
Returns:
the last line that was output by the running FOAM-process

mpi(self)

 
Returns:
name of the MPI-implementation

nrWarnings(self)

 
Number of warnings the executable emitted

pyFoamVersion(self)

 
Returns:
Version number of the PyFoam

scriptName(self)

 
Name of the Python-Script that runs the show

tail(self)

 
Returns:
the current last lines as a string

uname(self)

 
Returns:
the complete uname-information