Home Reference Houdini Object Model hou 

hou.appendSessionModuleSource function

Appends the given source code to the hou.session module. The appended code is made available immediately. You do not have to re-import hou.session.

appendSessionModuleSource(source)

This function throws a hou.OperationFailed exception if it fails to update the hou.session module. This can happen if the appended source has syntax errors or if it conflicts with the existing contents of the module.