When using embedded Python, OrcaFlex detects the latest Python 2 or Python 3 version it can find installed.
This allows OrcaFlex to execute Python code directly from the OrcaFlex process. When executing Python scripts external functions, post calculation actions and user defined results, OrcaFlex uses embedded Python.
Python can be downloaded from and is simple to install (full details are given with the downloads): See Getting NumPy and other packages for the standard Python below for information on obtaining third party modules.
The latter is a good source for 64 bit pre-compiled binary third party Python packages for the latest Python versions, the former repository is used by Python's convenient built in package installer – pip.
Python modules can be obtained from the PyPI package repository and also from Christoph Gohlke's page. NumPy is required in order to use the Python interface. Python has a comprehensive set of supporting libraries, including NumPy and SciPy, which provide some useful functions for scientific computing, see for more details. Either option will work with OrcaFlex, and there's little to choose between these two options.
If you are using OrcaFlex 9.6 or later you have the choice of either 32 bit or 64 bit Python. Official support for Python 2.7 will end in 2020, so we recommend using Python 3 unless a particular module you require is only available for Python 2, or you need to maintain compatibility with existing Python scripts you use.
Python 2.7 has now been declared a legacy version, with all new development occurring in Python 3 ( Python wiki: Python 2 or Python 3). The Python interface to OrcaFlex requires Python version 2.7 or Python version 3.4 to 3.10 inclusive. What's more, the Python Package Index is ever-growing with all the essentials tools that you'll need to make coding more efficient.To use the Python interface to OrcaFlex you need to install Python and also the interface files OrcFxAPI.py and OrcFxAPIConfig.py that we supply – see below. Its focus on simplicity and readability makes it easy for beginners and experts alike to understand and adapt to various scenarios and use cases. Overall, Python is among the best programming languages to learn and get you started in program development. Before you jump in and start coding, do consider the industry you're involved in first as this particular language is not suited for mobile app development. It's built a strong community for itself, offering guidance and contributions to its already powerful toolbox.
It runs on just about every major platform (including Windows 11) available in the market today. Lastly is Python's high adoption rate and popularity. It can also be used in various types of projects, and developers can choose between object-oriented or procedural programming modes, along with support for various data types. It's ideal for beginners for its fast performance, ease of use, and relatively small learning curve-which can be attributed to its high readability. Its language structure bears similarities with English and some elements from mathematics, making it easy to read code-whether it be yours or someone else's.Īnother point that goes in favor of Python is its high reliability and scalability. As was mentioned earlier, simplicity and readability are paramount. Why Python?ĭespite the increasing number of programming languages and development platforms available in the market today, there are some key factors that make Python stand out from the rest. It contains standards and libraries in fields, such as web development and data sciences.
There are thousands of third-party modules available for it in the Python Package Index, also known as PyPI. The great thing about Python is that it's built on a solid and compact foundation at its core, but is extensible and can be adapted to various applications through the use of modules. It includes data structures, dynamic binding, and many other features that make it suitable for making complex applications, as well as serving as a "glue" of sorts to connect different components together. Today, it's hailed as a high-level general-purpose programming language used in the development of programs and a variety of other use cases, including web design and the creation of system scripts. The core philosophy behind its conception was that it was to serve as a programming language that is simple yet functional, complex yet fully understandable by everyone who uses it, and compact yet highly adaptable for various types of uses. Python was first conceived back in the late 1980s by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands.