Breaking Changes for Developer Toolkit and Smart Acquisition Toolkit
For the Developer Toolkit (OAD) and Smart Acquisition Toolkit (Experiment Feedback) there are possible breaking changes to scripts due to upgrade from IronPython 2.7 to IronPython 3.4. This upgrade introduces syntax changes that may render existing macros (.czmac or .py) incompatible with the new version.
For Experiment Feedback scripts you have to manually adapt the scripts to be compatible with IronPython 3 in case they are incompatible.
For other existing macros that will no longer work due to syntax differences between IronPython 2 and IronPython 3, a conversion tool is provided to update existing scripts for compatibility with the latest ZEN versions. To convert your macros you can either use the ZeissPython distribution which you can find in the ZEISS Microscopy Installer (ZMI), or you can use your own python distribution. You need the 2to3 tool, which reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code.
If you use the ZeissPython distribution available with the ZEISS Microscopy Installer, the 2to3 tool is located at located at C:\Program Files\Carl Zeiss\ZeissPython\Py23279.1\env. If you use your own Python distribution to run the conversion tools, you have to ensure that the 2to3 tool is available in your Python distribution. If necessary, it can be added using: pip install 2to3
If you are operating older and newer ZEN versions, you may need to use two different versions of your OAD scripts, one version that is compatible with IronPython 2 and another version of your script that is compatible with IronPython 3.