PyFoam.Execution.BasicWatcher module¶
Watches the output of Foam-run
-
class
PyFoam.Execution.BasicWatcher.
BasicWatcher
(filenames, silent=False, tailLength=1000, sleep=0.1, endTime=None, follow=True)[source]¶ Bases:
object
Base class for watching the output of commands
Works like the UNIX-command ‘tail -f <file>’: the last lines of the file are output. If the file grows then these lines are output as they arrive
-
__dict__
= mappingproxy({'__module__': 'PyFoam.Execution.BasicWatcher', '__doc__': "Base class for watching the output of commands\n\n Works like the UNIX-command 'tail -f <file>': the last lines of the file are output.\n If the file grows then these lines are output as they arrive", '__init__': <function BasicWatcher.__init__>, 'getSize': <function BasicWatcher.getSize>, 'addChangeFileHook': <function BasicWatcher.addChangeFileHook>, 'changeFile': <function BasicWatcher.changeFile>, 'start': <function BasicWatcher.start>, 'startHandle': <function BasicWatcher.startHandle>, 'stopHandle': <function BasicWatcher.stopHandle>, 'tailingHandle': <function BasicWatcher.tailingHandle>, 'lineHandle': <function BasicWatcher.lineHandle>, '__dict__': <attribute '__dict__' of 'BasicWatcher' objects>, '__weakref__': <attribute '__weakref__' of 'BasicWatcher' objects>})¶
-
__init__
(filenames, silent=False, tailLength=1000, sleep=0.1, endTime=None, follow=True)[source]¶ - Parameters
filename – name of the logfile to watch
silent – if True no output is sent to stdout
tailLength – number of bytes at the end of the fail that should be output.
follow – if the end of the file is reached wait for further input
Because data is output on a per-line-basis :param sleep: interval to sleep if no line is returned
-
__module__
= 'PyFoam.Execution.BasicWatcher'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-