Constructors
Properties
Gets or sets the Python script "print()" target.
By default string output goes to the Rhino.RhinoApp.Write function. Set Output if you want to redirect the output from python to a different function while this script executes.
Command associated with this script. Used for localiation
object set to variable held in scriptcontext.doc.
Methods
Add assembly to list of assemblies used by python
Parameters:
| assembly (Assembly) |
Compiles a class in a quick-to-execute proxy.
Parameters:
| script (string) | A string text. |
Returns: A Python compiled code instance.
Determines if the main scripting context has a variable with a name.
Parameters:
| name (string) | The variable name. |
Returns: true if the variable is present.
Constructs a new Python script context.
Returns: A new Python script, or null if none could be created. Rhino 4 always returns null.
Creates a control where the user is able to type Python code.
Evaluates statements and an expression in the main scripting context.
Executes a Python file. The file is executed in a new, __main__ scope.
Parameters:
| path (string) | The path to the file. |
Returns: true if the file executed. This method can throw scripting-runtime based exceptions.
Executes a Python file in the calling script scope. All old variables are kept.
Parameters:
| path (string) | The path to the file. |
Returns: true if the file executed. This method can throw scripting-runtime based exceptions.
Executes a Python string.
Parameters:
| script (string) | A Python text. |
Returns: true if the file executed. This method can throw scripting-runtime based exceptions.
GetSearchPaths
#Protected helper function for static SearchPaths
Retrieves a meaningful representation of the call stack.
Parameters:
| ex (Exception) | An exception that was thrown by some of the methods in this class. |
Returns: A string that represents the Python exception.
Gets the object associated with a variable name in the main scripting context.
Parameters:
| name (string) | A variable name. |
Returns: The variable object.
Retrieves all variable names in the script.
Returns: An enumerable set with all names of the variables.
Removes a defined variable from the main scripting context.
Parameters:
| name (string) | The variable name. |
Get list of assemblies used by python for library browser and inclusion into the runtime
Sets a variable for runtime introspection.
Setups the script context. Use a RhinoDoc instance unless unsure.
Parameters:
| doc (object) | Document. |