RhinoCommon API
PythonScript Class |
Represents a Python script.

Namespace: Rhino.Runtime
Assembly: RhinoCommon (in RhinoCommon.dll)

The PythonScript type exposes the following members.

Name | Description | |
---|---|---|
![]() | PythonScript |
Initializes a new instance of the PythonScript class.
|

Name | Description | |
---|---|---|
![]() | ContextId |
Gets or sets a context unique identified.
|
![]() | Output |
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. |
![]() | ScriptContextCommand |
Command associated with this script. Used for localiation
|
![]() | ScriptContextDoc |
object set to variable held in scriptcontext.doc.
|

Name | Description | |
---|---|---|
![]() | Compile |
Compiles a class in a quick-to-execute proxy.
|
![]() | ContainsVariable |
Determines if the main scripting context has a variable with a name.
|
![]() ![]() | Create |
Constructs a new Python script context.
|
![]() | CreateTextEditorControl |
Creates a control where the user is able to type Python code.
|
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | EvaluateExpression |
Evaluates statements and an expression in the main scripting context.
|
![]() | ExecuteFile |
Executes a Python file.
|
![]() | ExecuteScript |
Executes a Python string.
|
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetStackTraceFromException |
Retrieves a meaningful representation of the call stack.
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetVariable |
Gets the object associated with a variable name in the main scripting context.
|
![]() | GetVariableNames |
Retrieves all variable names in the script.
|
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | RemoveVariable |
Removes a defined variable from the main scripting context.
|
![]() | SetIntellisenseVariable |
Sets a variable for runtime introspection.
|
![]() | SetupScriptContext |
Setups the script context. Use a RhinoDoc instance unless unsure.
|
![]() | SetVariable |
Sets a variable with a name and an object. Object can be null (Nothing in Visual Basic).
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |

Rhino for Mac
Supported in: 5.4Rhino for Windows
Supported in: 6.14