src.poem.poemUtils

Created on April 1, 2024 @author: wangc

Attributes

logger

Functions

convertNodeTextToList(nodeText[, sep])

Convert space or comma separated string to list of string

convertNodeTextToFloatList(nodeText[, sep])

Convert space or comma separated string to list of float

convertStringToFloat(xmlNode)

Convert xml node text to float

convertStringToInt(xmlNode)

Convert xml node text to integer.

toString(s)

Method aimed to convert a string in type str

convertStringToBool(nodeText)

Convert string to bool

Module Contents

src.poem.poemUtils.logger[source]
src.poem.poemUtils.convertNodeTextToList(nodeText, sep=None)[source]

Convert space or comma separated string to list of string @ In, nodeText, str, string from xml node text @ Out, listData, list, list of strings

src.poem.poemUtils.convertNodeTextToFloatList(nodeText, sep=None)[source]

Convert space or comma separated string to list of float @ In, nodeText, str, string from xml node text @ Out, listData, list, list of floats

src.poem.poemUtils.convertStringToFloat(xmlNode)[source]

Convert xml node text to float @ In, xmlNode, xml.etree.ElementTree.Element, xml element @ Out, val, float, value of xml element text

src.poem.poemUtils.convertStringToInt(xmlNode)[source]

Convert xml node text to integer. @ In, xmlNode, xml.etree.ElementTree.Element, xml element @ Out, val, integer, value of xml element text

src.poem.poemUtils.toString(s)[source]

Method aimed to convert a string in type str @ In, s, string, string to be converted @ Out, s, string, the casted value

src.poem.poemUtils.convertStringToBool(nodeText)[source]

Convert string to bool @ In, nodeText, str, string from xml node text @ Out, val, bool, True or False