houdiniInterpreter module¶
-
class
houdiniInterpreter.
HoudiniConsole
(locals=None, filename='<console>')¶ Bases:
code.InteractiveConsole
A code.InteractiveConsole subclass that keeps restarting if sys.exit was called or sys.stdin.readline() returned a blank line. It will exit if sys.stdin is closed and reading from it raises an IOError, though.
-
interact
(banner)¶
-
raw_input
(prompt='')¶
-
-
houdiniInterpreter.
avoidWritingToConsole
(enable)¶ Avoid sending Python output to the normal standard output (i.e. the console window). When a Houdini Python shell window is open, the output will go there, as usual. Normally, when Houdini’s Python shell is not open, anything printed by Python will go to the console window. When this function is called, it ensures that output will always go to a Houdini Python shell window, and will open one if it’s not already open.
-
houdiniInterpreter.
getAutoCompleteArgumentsList
(command, locals_dict, meta_info_only=False)¶ Return a list of choices for auto completion of arguments. Completion is done based on the right-most object before a ‘.’, the method called on that object before a ‘(‘, and the partial arguments following the ‘(‘.
-
houdiniInterpreter.
getAutoCompleteArgumentsString
(command, locals_dict)¶ Return a newline-separated string with the results of getAutoCompleteArgumentsList().
-
houdiniInterpreter.
getAutoCompleteMethodsList
(command, locals_dict)¶ Return a list of choices for auto completion of the command. Completion is done based on the right-most object before a ‘.’, and filters the results based on the text to the right of the ‘.’.
-
houdiniInterpreter.
getAutoCompleteMethodsString
(command, locals_dict)¶ Return a newline-separated string with the results of getAutoCompleteMethodsList().
-
houdiniInterpreter.
getCallTip
(command, locals_dict)¶ Return the call tip (based on the doc string) for the function being called in the command.
-
houdiniInterpreter.
getMinimumAutoComplete
(command, locals_dict)¶ For a command, return the extra text that can be added to the command for auto-completion, without making any arbitrary choices. For example, if the command is “x.ch” and the choices for completion in x are “channelName” and “channelType”, this function will return “annel”.
-
houdiniInterpreter.
getPossibleAutoCompletions
(command, locals_dict)¶ For a command, return a list of possible completions. For example, if the command is “x.ch” and the choices for completion in x are “channelName” and “channelType”, this function will return [“channelName, channelType”].
-
houdiniInterpreter.
initNewShell
()¶ Initialize a new shell by printing the Python banner and prompt.
This should be called when spawning an additional shell (not the first one).
-
houdiniInterpreter.
interact
(locals_dict=None)¶ Start the interactive console. If no locals dictionary is passed in, a new one will be created. If the hou module can be imported, it will be added to the dictionary.
-
houdiniInterpreter.
isRunningInHoudiniGUI
()¶ Return True if we’re being used from Houdini’s GUI, supplying the behaviour for its Python shell.
-
houdiniInterpreter.
redirectIOToPythonShellInHoudini
()¶ Redirect Python’s standard input and output to Houdini’s Python shell window.
-
houdiniInterpreter.
restoreIOFromPythonShellInHoudini
()¶ Redirect Python’s standard input and output back to what it was before Houdini’s Python shell window was opened.