hou.expandString
function
Evaluates the given string expression and returns the result.
Usage
expandString(str) -> string
Given a string, evaluate it as though it is in the contents of an non-animated string parameter.
Global variables in the string are expanded, and anything inside backticks is evaluated as an hscript expression. For example, hou.expandString('$F') returns the current frame number while hou.expandString('`ch("/obj/geo1/tx")`') returns the value of the translate X parameter for geo1.
See hou.hscriptExpression for examples and differences between hou.expandString and hou.hscriptExpression with respect to variable expansion.
>>> hou.expandString("$HIP/file.geo") '/dir/containing/hip/file/file.geo' >>> hou.expandString("file`$F+1`.pic") 'file2.pic'