Skip to content

Overview of Python Scripting Support

Overview of Python Scripting Support – figure 1

While Model Query Language (MQL) provides an easy and convenient approach for structured model querying and manipulation, scripting is the ultimate solution to extend the Tool to meet your customization requirements. This feature enables users to inject custom process or plug –in custom functions for sophisticated model manipulation in the Tool environment. More specifically, users can

There are many scripting languages available. Python was selected because of the following:

  • Python is a high-level English-like scripting language that requires very gentle leaning curves. Many users have developed Python skills.
  • Python is powerful, supporting almost all of the programming models, ranging from object-oriented programming to declarative functional programming.
  • Python is interoperable with C++ (the programming language used for the server application). There are strong 3rd-party supports.

To support user-driven scripting, a selected set of model query and manipulation APIs are wrapped and exposed in Python. To help users get started, a rich set of sample scripts are provided. These sample scripts and the detailed explanations in the related documentation show users how to build script-based applications, assuming users have little experience with Python programming. These scripts can be found under folder \CIMSpy\scripting. The documents in this section will use these samples as examples to tutor users how to build script-based applications.

Before working on any details of scripting, users must setup their Python environments and understand the fundamental of scripting support.

Overview of Subtopics