Package tacval :: Package runs :: Module runscript :: Class Runscript
[hide private]
[frames] | no frames]

Class Runscript

source code

        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        Runscript

A runscript thread The runscript class opens and parses runscripts for each command in the runscript a runitem is spawned to process the command

Instance Methods [hide private]
 
__init__(self, parent)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
setup_and_start(self, path)
open the runscript file and start thread
source code
list
_clean_header(self, path)
clean the header from the runscript delimited by # and return the command lines
source code
 
run(self)
create a new Condition for synchronization
source code

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, join, setDaemon, setName, start

Inherited from threading.Thread (private): _set_daemon

Inherited from threading._Verbose (private): _note

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

Class Variables [hide private]
  NEW_LINE_CHAR = '\n'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent)
(Constructor)

source code 

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

Overrides: object.__init__

setup_and_start(self, path)

source code 

open the runscript file and start thread

Parameters:
  • path (str) - the absolute path to the runscript file

_clean_header(self, path)

source code 

clean the header from the runscript delimited by # and return the command lines

Parameters:
  • path (str) - the absolute path to the runscript file
Returns: list
list of command lines

run(self)

source code 
  1. create a new Condition for synchronization
    • acquire the condition
  2. loop thru the lines in the runscript
    • spawn and new RunItem thread
    • wait the condition
  3. release the condition
Overrides: threading.Thread.run