hou.ShellIO class

Methods

addDataForReading(self, data)

Not documented yet

addEOFForReading(self)

Not documented yet

addExitCallback(callback)

Register a Python callback to be called whenever the last Houdini Python Shell is closed.

def cleanup():
    # Here is where you would run your cleanup code when
    # the Python shell has closed.
    pass
hou.ui.shellIO().addExitCallback(cleanup)

callback

Any callable Python object that expects no parameters. It could be a Python function, a bound method, or any object implementing __call__.

You might use this function to cleanly terminate any mechanisms that are dependent on the Python shell. For example, you can register a callback which disables an object from logging output messages to the shell.

exitCallbacks()tuple of callback

Return a tuple of all the Python callbacks that have been registered with hou.ShellIO.addExitCallback.

getAndClearWrittenData(self) → string

Not documented yet

interruptShellThread(self)

Not documented yet

isatty(self)bool

Implemented as part of the “file-like object” interface.

isWaitingForCommand(self) → bool

Not documented yet

readline(self, size=-1) → string

Not documented yet

removeExitCallback(callback)

Remove a Python callback that was previously registered with hou.ShellIO.addExitCallback. See hou.ShellIO.addExitCallback for more information.

Raises hou.OperationFailed if the callback was not previously registered.

setIsWaitingForCommand(self, on)

Not documented yet

write(self, data)

Not documented yet