doc_mScript¶
Documentation¶
- Brief Explanation of Script
- This class is inherited from InputPrototype
- It will read XML script files. The XML files contain variables that are components of models.
- Other comments:
These scripts (eg .scriptScript2.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.
- List of Member Variables and Methods
How to Create a class instance
>>> s=Script(sFilePath=".\\script\\Script2.txt")
- Functions
__init__(self,*args,**kwargs)
>>> s.__dict__ {'dVariables': {'aa': <mVariable.Variable at 0xa201470>, 'bb': <mVariable.Variable at 0xa201668>, 'CC': <mVariable.Variable at 0xa2017b8>}, '_pThisModuleDir': WindowsPath('C:/Users/User/Documents/ACT/ActModel/ActModel_Current'), '_pFilePath': WindowsPath('script/Script2.txt'), '_xmlRoot': <Element 'ROOT' at 0x000000000A1DDE58>, 'CLASS_TYPE': 'Script', 'NAME': 'oneguy', 'FEATURES': [''], 'BODY': {'aa': <mVariable.Variable at 0xa201470>, 'bb': <mVariable.Variable at 0xa201668>, 'CC': <mVariable.Variable at 0xa2017b8>}}
- _fXMLFindChildOutputList(self,sChildName,sType=”str”, bIsArray=True, #xmlRoot=None,
sStripChars=r”s+”,sSplitChars=”,”)
Inherited
_fXMLReadBody(self)
>>> s._fXMLReadBody() {'aa': <mVariable.Variable at 0xa2073c8>, 'bb': <mVariable.Variable at 0xa207400>, 'CC': <mVariable.Variable at 0xa207438>}
… and other functions
- Variables
- self._pThisModuleDir
- self._pFilePath
- self._xmlRoot
- self.BODY
- Related Document
Sample Code for Script2.txt