doc_mScript ============= Documentation ************* 1. Brief Explanation of Script 1. This class is inherited from InputPrototype 2. It will read XML script files. The XML files contain variables that are components of models. 3. Other comments: These scripts (eg .\script\ Script2.txt) containing definitions for different functions that will dependent on each other. Each variable in the script will be stored as a Variable class instance. 2. List of Member Variables and Methods 0. How to Create a class instance >>> s=Script(sFilePath=".\\script\\Script2.txt") 1. Functions 1. __init__(self,*args,**kwargs) >>> s.__dict__ {'dVariables': {'aa': , 'bb': , 'CC': }, '_pThisModuleDir': WindowsPath('C:/Users/User/Documents/ACT/ActModel/ActModel_Current'), '_pFilePath': WindowsPath('script/Script2.txt'), '_xmlRoot': , 'CLASS_TYPE': 'Script', 'NAME': 'oneguy', 'FEATURES': [''], 'BODY': {'aa': , 'bb': , 'CC': }} 2. _fXMLFindChildOutputList(self,sChildName,sType="str", bIsArray=True, #xmlRoot=None, sStripChars=r"\s+",sSplitChars=",") Inherited 3. _fXMLReadBody(self) >>> s._fXMLReadBody() {'aa': , 'bb': , 'CC': } ... and other functions 2. Variables 1. self._pThisModuleDir 2. self._pFilePath 3. self._xmlRoot 4. self.BODY 3. Related Document Sample Code for Script2.txt .. code-block:: xml Script oneguy PROD1 ACC1 def aa(t): return t PROD2 ALL def bb(t,k): return aa(t)*k PROD2,PROD3 def CC(): return aa(1)+1