CODESYS comes with built-in support for Ironpython. The Ironpython scripts are running inside of the CODESYS IDE, and can be used to automate huge parts of the system. That virtually everything within CODESYS can be automated this way, and that CODESYS can even be started headless, running a python script, makes the system really mighty.
There are many use cases you can think of:
See also CODESYS Help
CODESYS does not posses an internal Python script editor.
To edit python scripts there are more then enough alternatives available.
Offcourse you are free to use any tool that you wish, but we can give some suggestions (not exhaustive):
VS.Net (visualstudio.microsoft.com) Select the "Visual Studio IDE Community" version, install IronPython support via the installation proces.
**TIP: you can opt to install notepad++ and PyCharm or Visual Studio in tandem as they complement each other well **
*Visual Studio Code or VS.Net can be an alternative, however, the CFORGE tool is developped using VS.NET, so your mileage may vary.
As of CODESYS version 3.5.14.0, https://help.codesys.com/webapp/idx-scriptingengine;product=ScriptEngine;version=3.5.14.0 offers an exthaustive overview of the various available scripting objects and their possibilities.
cforge heavily uses the scripting API to automate some workflows for developers.