Organizing scripts¶
This section describes some possible ways to create and organize scripts.
Scripts are conveniently arranged in groups (and subgroups if desired) and storages. A storage is a physical collection of script functions similar to a file, and the scripts within the storage may call each other (allowing common functionality to be shared among scripts in the same storage). Groups and subgroups can be created and renamed, and subgroups can be moved between groups, similar to the way files and folders are managed on disk. A group (or sub Group) can contain a number of scripts and theses scripts may come from different storages. Similarly the scripts in a storage may be organized in difference groups.
View by Scripts or Storage¶
The view of scripts can be either by Scripts, where the scripts are organized in Groups or by storage where the scripts are displayed directly without their group association. To select the view:
Right click on the database level and select either Scripts or Storage from the context menu.
Add a new group¶
When the Group view has been selected, a new group can be added.
Create a new Group by right clicking on the database level, and select Add New Group from the context menu.
The new script group is created as a subgroup under the group that was selected.
The new model group will by default be called New Group(X), where X refers to the group number at the specific level where is has been created.
Rename a group¶
An existing script group can always be renamed.
Right-click on the group and select Rename from the context menu.
Add a storage¶
When the Storage view has been selected, a new storage can be added.
Create a new Storage by right clicking on the database level, and select Add Storage from the context menu.
Note
Note that storages cannot be arranged in groups.
Script Storage type¶
A script storage is by default using the .NET implementation of Python IronPython.
IronPython is an excellent addition to the .NET Framework, providing Python developers with the power of the .NET Framework. Existing .NET developers can also use IronPython as a fast and expressive scripting language.
IronPython aims to be a fully compatible implementation of the Python language. At the same time, the value of a separate implementation than CPython is to make available the .NET ecosystem of libraries. IronPython does this by exposing .NET concepts as Python entities. Existing Python syntax and new Python libraries (like clr) are used to make .NET features available to IronPython code.
As an alternative, CPython is also supported using PythonNet
Note
Note that the PythonNet package does not implement Python as a first-class CLR language. It does not produce managed code (IL) from Python code. Rather, it is an integration of the CPython engine with the .NET or Mono runtime. This approach allows you to use CLR services and continue to use existing Python code and C-API extensions while maintaining native execution speeds for Python code. If you are interested in a pure managed-code implementation of the Python language, you should check out the Iron Python project, which is in active development.
Rename a storage¶
When the Storage has been added an empty script will appear in the Data View with the default name. Furthermore a Script Debugger will appear.
The storage can be renamed by right clicking on its name and select rename from the context menu
Note
Note that in the following the data view will be referred to as the script view.
Note
Note that scripts in the storage will not appear in the Group view until the storage has been saved.