- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
HFSS15: Introduction to IronPython
IronPython is an implementation of the Python programming language targeting the .NET runtime. What this means in practical terms is that IronPython uses the python programming language syntax and standard python libraries and can additionally use .NET classes and objects to give one the best of both worlds. This usage of .NET classes is fairly seamless in that a class defined in a .NET assembly can be used as a base class of a python class.
Scope
Functioning as a tutorial on Python or IronPython is way out of the scope of this document. There are several excellent resources online that do a very good job in that regard. This document only attempts to provide a limited introduction to IronPython as used to script ANSYS EM products.
This document is also not a tutorial on the scripting of ANSYS EM products. It complements the existing scripting guide (available from a product's Help menu) and provides a pythonic interpretation of that information. The reader might have to refer to either the scripting guide or recorded samples of VBScript to follow some of the sections.
Python compatibility
The version of IronPython in use is 2.6.1 and built on the .NET framework version 2.0: this version targets Python 2.6 language compatibility. While most python files will execute under IronPython with no changes, python libraries that make use of extensions written in the C programming language (NumPy or SciPy for instance), are not expected to work under IronPython. In such cases, it might be possible to locate .NET implementation of such libraries or explore the use of IronClad.
(http://code.google.com/p/ironclad/).
Advantages of IronPython
The advantages that IronPython use provides are significant:
Python has a large eco-system with plenty of supporting libraries, Visual IDEs and debuggers. It is actively developed and enhanced.
IronPython, in addition, has access to the entire .NET eco system. This allows us, for instance, to create a modern GUI using the System.Windows.Forms assembly from IronPython code and call any other .NET assembly for that matter.
The use of IronPython’s technologies enables the ability to interactively script Desktop (feature in development). This allows better discovery of the scripting APIs as well as directly programming to the scripting API in python, a language more tractable and platform independent compared with VBScript.
The Python syntax of dictionaries is somewhat easier to read and write when supplying arguments to the scripting methods.
HFSS 学习培训课程套装,专家讲解,视频教学,帮助您全面系统地学习掌握HFSS
上一篇:Interconnects for HFSS Distributed Memory Simulation
下一篇:Interconnects for HFSS-IE Distributed Memory Simulation