Getting started with Python/Jython scripting from the FactoryPMI Help. This seems to come up a lot.
As explained below, Jython and Python are identical languages. Because of the popularity of the Python language, there is a veritable plethora of tutorial resources available, both in print and electronically. Also, we have sprinkled small example Jython scripts that should be very readable and useful in real-life situations. As you go through some of these tutorials, we’d like to point your attention to the FactoryPMI “Script Playground”, which lets run Jython scripts in a console-like environment. This is found in the Designer under Tools, Advanced
Non-Programmers Tutorial For Python (by Josh Cogliati) This is a great resource for people who aren’t very familiar with procedural languages. It starts at the beginning - introducing statements and variables, and covers the various Python variable types.
Learn to Program using Python (by Richard Baldwin) This page works well as a reference and as a tutorial.
Python Tutorial. This is the official python tutorial. It covers pretty much everything, and is well organized. You can skip chapter 2, as you will be using FactoryPMI as your interpreter.
Advanced users: don’t be fooled by Python’s elegant, readable and forgiving syntax: it is not just a beginner’s language. Python supports a variety of programming styles, from simple scripts to a fully polymorphic Object-Oriented application
Nuts and Bolts
Jython is the same language as the popular language Python. Jython is simply Python running in Java (as opposed to Python running in C, which is what most people are familiar with). So, if you know Python, you know Jython. The major difference is that in Jython, the entire Java standard library is available to use, for the more advanced user. In FactoryPMI, there are some more differences. In order to keep the Jython scripting engine smaller, only parts of the Python standard library are included.